ci: Skip CI on push to main #18
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: Docs | |
on: | |
push: | |
branches: [main] | |
permissions: read-all | |
jobs: | |
build-docs: | |
name: Build Docs | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: .node-version | |
cache: yarn | |
- name: Install deps | |
run: yarn install --frozen-lockfile | |
- name: Build package | |
run: yarn run build | |
- name: Generate API docs | |
run: yarn run make-docs | |
- name: Upload docs artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: docs/ | |
deploy-docs: | |
name: Deploy Docs | |
needs: build-docs | |
runs-on: ubuntu-latest | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
concurrency: | |
group: pages | |
cancel-in-progress: false | |
steps: | |
- name: Publish API docs to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |