GitHub Pages #390
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: GitHub Pages | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
on: | |
push: | |
branches: | |
- main # Set a branch name to trigger deployment | |
workflow_dispatch: # Enable manual deploy | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install the latest version of uv | |
uses: astral-sh/setup-uv@v5 | |
- name: Build | |
env: | |
GH_PAT: ${{ secrets.SODA_DASH_PAT }} | |
run: uv run main.py | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: './public' | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |