Move Testing.md and create Style.md #125
Workflow file for this run
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 and Deploy JSDoc | |
on: | |
pull_request: | |
branches: | |
- main | |
paths-ignore: | |
- 'docs/**' | |
jobs: | |
documentation: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
strategy: | |
matrix: | |
node-version: [21.x] | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
with: | |
persist-credentials: false | |
ref: ${{ github.event.pull_request.head.ref }} | |
fetch-depth: 2 | |
- name: Check changed files | |
id: changed-files-yaml | |
uses: tj-actions/changed-files@v40 | |
with: | |
since_last_remote_commit: true | |
files_yaml: | | |
nondoc: | |
- '!docs/**' | |
- 'src/**' | |
- name: Set up Node.js | |
if: steps.changed-files-yaml.outputs.nondoc_any_changed == 'true' | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install Dependencies | |
if: steps.changed-files-yaml.outputs.nondoc_any_changed == 'true' | |
run: npm install | |
- name: Generate JSDoc Documentation | |
if: steps.changed-files-yaml.outputs.nondoc_any_changed == 'true' | |
run: npm run generate-docs | |
- name: Commit Documentation | |
if: steps.changed-files-yaml.outputs.nondoc_any_changed == 'true' | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Actions" | |
git add docs | |
git commit -m "Generated documentation" | |
- name: Push Documentation | |
if: steps.changed-files-yaml.outputs.nondoc_any_changed == 'true' | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.PAT }} | |
branch: ${{ github.event.pull_request.head.ref }} | |