docs: pages permission #4
This file contains 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: documentation | |
on: | |
push: | |
branches: | |
- main | |
- | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
outputs: | |
page_url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: "⬇️ Checkout" | |
uses: actions/checkout@v3 | |
- uses: pnpm/[email protected] | |
name: Install pnpm | |
id: pnpm-install | |
with: | |
version: latest | |
run_install: false | |
- name: Use Node.js ${{ inputs.node-version }} | |
uses: actions/[email protected] | |
with: | |
node-version: ${{ inputs.node-version }} | |
- name: "📚 Build documentation" | |
working-directory: ./docs | |
run: | | |
pnpm install --frozen-lockfile && \ | |
pnpm run build | |
- name: "🚀 Upload documentation" | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: ./docs/build | |
deploy_pages: | |
runs-on: ubuntu-latest | |
needs: build | |
environment: | |
name: github-pages | |
url: ${{ needs.build.outputs.page_url }} | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |