Skip to content

Deploy static content to Pages #11072

Deploy static content to Pages

Deploy static content to Pages #11072

Workflow file for this run

# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages
on:
schedule:
- cron: '10 0/1 * * *'
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
env:
IFSC_RSS_FEED_URL: "https://www.ifsc-climbing.org/news?format=feed&type=rss"
LATEST_CALENDAR_URL: "https://github.com/sportclimbing/ifsc-calendar/releases/latest/download/IFSC-World-Cups-and-World-Championships.json"
YEAR: 2024
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v3
- name: "Setup PHP"
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
- name: "Download latest calendar"
run: |
curl -sSL "${{ env.LATEST_CALENDAR_URL }}" \
--output "public/events/events_${YEAR}.json" \
--max-time 15
- name: "Download posters"
run: php bin/download-posters "${YEAR}" "public/events/events_${YEAR}.json"
- name: "Copy video covers"
run: |
composer install
cp vendor/sportclimbing/ifsc-youtube-videos/data/covers/original/*.jpg public/img/covers/ || true
cp vendor/sportclimbing/ifsc-youtube-videos/data/covers/optimized/*.jpg public/img/covers/ || true
- name: "Setup Pages"
uses: actions/configure-pages@v3
- name: "Upload artifact"
uses: actions/upload-pages-artifact@v1
with:
path: 'public/'
- name: "Deploy to GitHub Pages"
id: deployment
uses: actions/deploy-pages@v2