Deploy website #391
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: Deploy website | |
| # Builds the Astro site in website/ and publishes it to GitHub Pages. | |
| on: | |
| push: | |
| branches: [dev] | |
| paths: | |
| - 'website/**' | |
| - '.github/workflows/website.yml' | |
| # The download counter is computed at build time, so rebuild periodically to | |
| # keep it fresh (every 6 hours). Scheduled runs use this file on the default | |
| # branch (dev). | |
| schedule: | |
| - cron: '17 */6 * * *' | |
| workflow_dispatch: | |
| # Allow only one concurrent deployment; let an in-progress run finish. | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: false | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: website | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| cache-dependency-path: website/package-lock.json | |
| - run: npm ci | |
| - name: Build | |
| run: npm run build | |
| # Authenticate the build-time GitHub API call (download counts) to avoid | |
| # the unauthenticated 60-req/hour rate limit. | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0 | |
| with: | |
| path: website/dist | |
| deploy: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - id: deployment | |
| uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0 |