publish #1919
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: publish | |
| on: | |
| push: | |
| branches: | |
| - main | |
| schedule: | |
| # Optimize for Indian working hours | |
| # Runs at 8:09 UTC = 13:39 IST | |
| # Runs at 12:09 UTC = 17:39 IST | |
| - cron: '09 8,12 * * *' | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| # Build | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install the default version of uv | |
| id: setup-uv | |
| uses: astral-sh/setup-uv@v6 | |
| - name: Build | |
| run: | | |
| echo "Installed uv version is ${{ steps.setup-uv.outputs.uv-version }}" | |
| uv sync | |
| uv run main.py | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v4 | |
| with: | |
| path: "output/" | |
| # Deployment job | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |