ci: add code analyzer #156
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: Documentation Generator | |
on: | |
push: | |
branches: | |
- "*" | |
- "!docs" | |
tags: | |
- "*" | |
jobs: | |
docs: | |
name: Documentation | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: "yarn" | |
cache-dependency-path: yarn.lock | |
- name: Install dependencies | |
run: yarn --immutable | |
- name: Checkout docs branch | |
uses: actions/checkout@v3 | |
with: | |
ref: "docs" | |
path: "docs" | |
- name: Generate documentation | |
run: yarn docs | |
- name: Move generated docs file | |
run: mv docs.json docs/${{ github.ref_name }}.json | |
- name: Commit and push | |
run: | | |
cd docs | |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
git add . | |
git commit -m "Docs build for ${{ github.ref_type }} ${{ github.ref_name }}: ${{ github.sha }}" | |
git push |