Bump publish workflow actions off deprecated Node 20 #47
Workflow file for this run
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: docs | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| permissions: {} | |
| # Cancel superseded PR builds, but never a production Pages deploy mid-flight. | |
| concurrency: | |
| group: docs-${{ github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # uv drives the prebuild data steps (lokf export, gen_api_docs); Node | |
| # builds the Astro/Starlight site. | |
| - uses: astral-sh/setup-uv@v5 | |
| with: | |
| enable-cache: true | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| cache-dependency-path: web/package-lock.json | |
| - name: Install the lokf package (for the prebuild data steps) | |
| run: uv sync --locked | |
| - name: Build the Astro site | |
| working-directory: web | |
| run: | | |
| npm ci | |
| npm run build | |
| - uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: web/dist | |
| deploy: | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| needs: build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - uses: actions/deploy-pages@v4 | |
| id: deployment |