Skip to content

pages-build-deployment #213

pages-build-deployment

pages-build-deployment #213

Workflow file for this run

name: pages-build-deployment
on:
push:
branches: [ 'main' ]
schedule:
- cron: '45 1 * * *'
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: 'pages'
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
- run: npm run test:unit
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- run: python -m pip install --upgrade pip
- run: pip install -r requirements.txt
- run: python competitions.py update -c 2013 -s 2022 -p ./src/data
env:
FOOTBALL_DATA_TOKEN: ${{ secrets.FOOTBALL_DATA_TOKEN }}
- run: python competitions.py update -c 2013 -s 2023 -p ./src/data
env:
FOOTBALL_DATA_TOKEN: ${{ secrets.FOOTBALL_DATA_TOKEN }}
- run: python competitions.py update -c 2013 -s 2024 -p ./src/data
env:
FOOTBALL_DATA_TOKEN: ${{ secrets.FOOTBALL_DATA_TOKEN }}
- run: python competitions.py update -c 2017 -s 2022 -p ./src/data
env:
FOOTBALL_DATA_TOKEN: ${{ secrets.FOOTBALL_DATA_TOKEN }}
- run: python competitions.py update -c 2017 -s 2023 -p ./src/data
env:
FOOTBALL_DATA_TOKEN: ${{ secrets.FOOTBALL_DATA_TOKEN }}
- run: python competitions.py update -c 2017 -s 2024 -p ./src/data
env:
FOOTBALL_DATA_TOKEN: ${{ secrets.FOOTBALL_DATA_TOKEN }}
- run: python competitions.py update -c 2021 -s 2022 -p ./src/data
env:
FOOTBALL_DATA_TOKEN: ${{ secrets.FOOTBALL_DATA_TOKEN }}
- run: python competitions.py update -c 2021 -s 2023 -p ./src/data
env:
FOOTBALL_DATA_TOKEN: ${{ secrets.FOOTBALL_DATA_TOKEN }}
- run: python competitions.py update -c 2021 -s 2024 -p ./src/data
env:
FOOTBALL_DATA_TOKEN: ${{ secrets.FOOTBALL_DATA_TOKEN }}
- run: python competitions.py index -p ./src/data
- run: npm run build
- uses: actions/upload-pages-artifact@v3
with:
path: ./dist
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/deploy-pages@v4