Build documentation #378
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: Build documentation | |
on: | |
workflow_dispatch: | |
workflow_run: | |
workflows: ["Release"] | |
types: | |
- completed | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/main' && github.event.workflow_run.conclusion == 'success' | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '18' | |
cache: yarn | |
- run: corepack enable | |
- run: yarn install --immutable | |
- run: yarn typedoc src/index.ts --githubPages false | |
- uses: actions/upload-pages-artifact@v1 | |
with: | |
path: ./docs | |
deploy: | |
runs-on: ubuntu-latest | |
needs: build | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- id: deployment | |
uses: actions/deploy-pages@v1 |