Files
Docs-Viewer/.github/workflows/main.yml
2025-03-24 14:19:16 +11:00

41 lines
958 B
YAML

name: Build Documentation Index
on:
push:
paths:
- 'docs/**'
branches:
- main
repository_dispatch:
types: [build_docs]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Build docs
run: node build-docs.js
- name: Check for changes
id: check_changes
run: |
git diff --quiet index.json || echo "changes=true" >> $GITHUB_OUTPUT
- name: Commit and push if changed
if: steps.check_changes.outputs.changes == 'true'
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add index.json
git commit -m "Update documentation index"
git push