Pin Pages deployment to canonical agentctl commit #9
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: GitHub Pages | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: pages-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| AGENTCTL_COMMIT: "f3181f93afac7546f01923491f77dabdf26b5ace" | |
| NODE_VERSION: "24.4.1" | |
| PNPM_VERSION: "11.9.0" | |
| RUST_TOOLCHAIN: "1.88.0" | |
| jobs: | |
| validate: | |
| runs-on: ubuntu-24.04 | |
| defaults: | |
| run: | |
| shell: bash | |
| working-directory: site | |
| steps: | |
| - name: Check out Pages source | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| path: site | |
| - name: Check out canonical agentctl source | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| repository: opensourceops/agentctl | |
| ref: ${{ env.AGENTCTL_COMMIT }} | |
| path: agentctl | |
| - name: Install pinned Node.js | |
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| - name: Install pinned Rust and pnpm | |
| run: | | |
| set -euo pipefail | |
| rustup toolchain install "$RUST_TOOLCHAIN" --profile minimal --component rustfmt | |
| rustup default "$RUST_TOOLCHAIN" | |
| corepack enable | |
| corepack prepare "pnpm@$PNPM_VERSION" --activate | |
| - name: Install site dependencies and browser | |
| run: | | |
| pnpm install --frozen-lockfile | |
| pnpm exec playwright install --with-deps chromium | |
| - name: Verify canonical docs and final site artifact | |
| env: | |
| AGENTCTL_REPO: ${{ github.workspace }}/agentctl | |
| run: pnpm verify:agentctl | |
| - name: Configure GitHub Pages | |
| if: github.event_name != 'pull_request' | |
| uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0 | |
| - name: Upload complete Pages artifact | |
| if: github.event_name != 'pull_request' | |
| uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0 | |
| with: | |
| path: site/_site | |
| deploy: | |
| if: github.event_name != 'pull_request' | |
| needs: validate | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0 |