Deploy to GitHub Pages #303
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy to GitHub Pages | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 7 * * *' # At 7:00 AM UTC every day (8:00 AM UTC+1) | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
- name: Install dependencies | |
run: | | |
cd data | |
npm install | |
cd ../ui | |
npm install | |
- name: Update data and build UI | |
run: make update | |
- name: Deploy to GitHub Pages | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
branch: gh-pages # The branch the action should deploy to. | |
folder: ui/build # The folder the action should deploy. | |
token: ${{ secrets.GITHUB_TOKEN }} # Use the built-in GitHub token for authentication | |