From 1269926a07d4b67a794d6cec294b9d018909e815 Mon Sep 17 00:00:00 2001 From: Max Litruv Boonzaayer Date: Mon, 24 Mar 2025 14:19:16 +1100 Subject: [PATCH] Create main.yml --- .github/workflows/main.yml | 40 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..fce10c9 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,40 @@ +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