Build manifest and deploy pages #20
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 manifest and deploy pages | |
| on: | |
| push: | |
| branches: [release] | |
| paths: | |
| - 'docs/**' | |
| - 'scripts/**' | |
| - 'package.json' | |
| - 'package-lock.json' | |
| - '.github/workflows/pages.yml' | |
| schedule: | |
| - cron: '0 0 * * *' | |
| workflow_dispatch: | |
| jobs: | |
| update: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| steps: | |
| - name: Checkout release branch for manifest | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: release | |
| path: release | |
| - name: Checkout main branch for docs | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: main | |
| path: main | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| - name: Install dependencies | |
| working-directory: release | |
| run: npm ci | |
| - name: Generate manifest | |
| working-directory: release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: npm run manifest:gen | |
| - name: Sign manifest | |
| working-directory: release | |
| run: npm run manifest:sign | |
| env: | |
| ED25519_PRIV_KEY_B64: ${{ secrets.ED25519_PRIV_KEY_B64 }} | |
| - name: Verify manifest | |
| working-directory: release | |
| run: npm run manifest:verify | |
| env: | |
| ED25519_PUB_KEY_HEX: ${{ secrets.ED25519_PUB_KEY_HEX }} | |
| - name: Copy manifest into main/docs | |
| run: | | |
| mkdir -p main/docs/manifest | |
| cp -R release/docs/manifest/* main/docs/manifest/ | |
| - name: Upload docs as Pages artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: main/docs | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |