json updater added #16
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: Update Documentation | |
on: | |
push: | |
branches: | |
- master # Update this branch name if needed | |
jobs: | |
update_docs: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: 3.12.1 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r ADMIN/MAINTAIN/REQUIREMENTS.txt | |
- name: Run ADMIN/MAINTAIN/UPDATE_DOC.py | |
run: python ADMIN/MAINTAIN/UPDATE_DOC.py | |
- name: Check if DOCUMENTATION.md is changed | |
id: check_changes | |
run: | | |
git diff --exit-code --quiet || echo "DOCUMENTATION.md has changes" | |
- name: Commit and push changes | |
if: steps.check_changes.outputs.result == 'DOCUMENTATION.md has changes' | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git add . | |
git commit -m "Update documentation [skip ci]" # skip ci to avoid triggering a new workflow run | |
git push | |