Add GitHub action to autogenerate ref docs on commit to master. #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: Docgen | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
jobs: | |
docs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "20" | |
- name: Cache npm | |
uses: actions/cache@v4 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-docgen-${{ hashFiles('**/package-lock.json') }} | |
- name: Install dependencies | |
run: npm ci | |
- name: Generate Reference Docs | |
run: | | |
npm run docgen:v1 | |
npm run docgen:v2 | |
- uses: actions/upload-artifact@v4 | |
name: Upload Docs Preview | |
with: | |
name: reference-docs | |
path: | | |
./docgen/v1/markdown/ | |
./docgen/v2/markdown/ |