Update workflow permissions #3
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 and Deploy Docs | |
on: | |
push: | |
branches: | |
main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20.x' | |
- name: Set up yarn | |
run: corepack enable && yarn set version 3.3.0 | |
- name: Install | |
run: yarn install | |
- name: Lint | |
run: yarn lint | |
- name: Build | |
run: yarn build | |
- name: Build docs | |
run: yarn docs | |
- name: Deploy docs to GitHub Pages | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
branch: gh-pages | |
folder: docs | |
ssh-key: ${{ secrets.DEPLOY_KEY }} |