Add docs publish workflow #1
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: Generate Docs | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
paths: | |
- 'src/**' | |
- '.github/workflows/docs.yml' | |
- 'package.json' | |
- 'yarn.lock' | |
jobs: | |
generate: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Build docs | |
run: | | |
yarn install | |
yarn build | |
- name: Deploy | |
if: ${{ github.event_name != 'pull_request' }} | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages | |
folder: .build/docs | |
git-config-name: QMK Bot | |
git-config-email: [email protected] |