Repository navigation
Build and deploy #209
This file contains hidden or 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: Build and deploy | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 6 * * *' | |
| permissions: | |
| contents: write | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: astral-sh/setup-uv@v7 | |
| - name: Run tests | |
| run: uv run --group test pytest | |
| - name: Bootstrap projects | |
| run: uv run bootstrap.py | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
| GH_USERNAME: ${{ vars.GH_USERNAME }} | |
| - name: Build site | |
| run: uv run build.py | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
| GH_USERNAME: ${{ vars.GH_USERNAME }} | |
| CACHE_TTL_HOURS: "0" | |
| CUSTOM_DOMAIN: ${{ vars.CUSTOM_DOMAIN }} | |
| - name: Deploy to gh-pages | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./output | |
| cname: ${{ vars.CUSTOM_DOMAIN }} |