Prepare releases (#1439) #51
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: Publish docs to GitHub Pages | |
| on: | |
| workflow_dispatch: | |
| push: | |
| tags: | |
| - "@cerbos/*@*" | |
| concurrency: | |
| group: publish-docs | |
| defaults: | |
| run: | |
| shell: bash | |
| permissions: {} | |
| jobs: | |
| generate: | |
| name: Generate docs | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Node.js | |
| uses: ./.github/actions/setup-node | |
| - name: Generate docs | |
| run: pnpm run docs | |
| - name: Bundle artifact | |
| working-directory: docs | |
| run: tar --create --file "${RUNNER_TEMP}/artifact.tar" --verbose . | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: github-pages | |
| path: ${{ runner.temp }}/artifact.tar | |
| retention-days: 1 | |
| if-no-files-found: error | |
| - name: Notify Slack on failure | |
| if: failure() | |
| uses: cerbos/actions/notify-slack@e3157d5b6353a7a4e8b0bffe9bc0b57d49b0c1d1 # main | |
| with: | |
| webhook-url: ${{ secrets.SLACK_CI_NOTIFICATIONS_WEBHOOK_URL }} | |
| publish: | |
| name: Publish docs to GitHub Pages | |
| needs: generate | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write | |
| pages: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.publish.outputs.page_url }} | |
| steps: | |
| - name: Publish docs to GitHub Pages | |
| id: publish | |
| uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0 | |
| - name: Notify Slack on failure | |
| if: failure() | |
| uses: cerbos/actions/notify-slack@e3157d5b6353a7a4e8b0bffe9bc0b57d49b0c1d1 # main | |
| with: | |
| webhook-url: ${{ secrets.SLACK_CI_NOTIFICATIONS_WEBHOOK_URL }} |