docs: refresh release and agentic design copy #38
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 | |
| on: | |
| push: | |
| branches: [main] | |
| paths: ['website/**', '.github/workflows/deploy-website.yml'] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9.15.0 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build website | |
| run: pnpm --filter open-codesign-website build | |
| - uses: actions/configure-pages@v4 | |
| - uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: website/.vitepress/dist | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| needs: build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| actions: write | |
| steps: | |
| # Work around actions/upload-pages-artifact@v3 bug where transient | |
| # network hiccups during upload can produce >1 artifact named | |
| # "github-pages" in a single run, which then makes deploy-pages@v4 | |
| # fail with "Multiple artifacts named 'github-pages'". Delete all | |
| # but the most recent before deploying. | |
| - name: Prune duplicate github-pages artifacts | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| RUN_ID: ${{ github.run_id }} | |
| REPO: ${{ github.repository }} | |
| run: | | |
| set -euo pipefail | |
| artifacts=$(gh api "/repos/$REPO/actions/runs/$RUN_ID/artifacts" \ | |
| --jq '[.artifacts[] | select(.name == "github-pages")] | sort_by(.created_at) | reverse') | |
| count=$(echo "$artifacts" | jq 'length') | |
| echo "Found $count github-pages artifact(s) in this run." | |
| if [ "$count" -le 1 ]; then | |
| exit 0 | |
| fi | |
| # Keep index 0 (newest); delete the rest. | |
| echo "$artifacts" | jq -r '.[1:] | .[].id' | while read -r id; do | |
| echo "Deleting duplicate artifact $id" | |
| gh api -X DELETE "/repos/$REPO/actions/artifacts/$id" | |
| done | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |