Skip to content

Improve submodule handling in docs workflow to prevent stale commit r… #45

Improve submodule handling in docs workflow to prevent stale commit r…

Improve submodule handling in docs workflow to prevent stale commit r… #45

Workflow file for this run

name: Documentation Update
on:
push:
branches:
- master
jobs:
docs:
runs-on: ubuntu-latest
name: Generate Documentation
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: false
- name: Initialize and update submodule
run: |
git submodule update --init --remote docs
cd docs
git checkout master
git pull origin master
cd ..
- name: Setup PHP
uses: shivammathur/setup-php@v2
- name: Install Dev Dependencies
run: composer update
- name: Generate Documentation
run: php ./makeDocs.php --push
- name: Commit & Push to Wiki
run: |
cd docs
git config user.email "actions@github.com"
git config user.name "GitHub Actions - update documentation"
git add *.md
(git commit -m "Auto-Update Documentation" && git push) || echo "No changes to commit"
cd ..
- name: Commit & Push Submodule Update to Main Repo
uses: Andro999b/push@v1.3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
message: "Auto-updated documentation"