Merge pull request #17 from flexcompute/emerson/sym_fix #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: Compile and commit docs | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- develop | |
paths: | |
- '_faqs/**' | |
- 'faq_categories.json' | |
jobs: | |
run-python-and-commit: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.workflow_run.head_branch }} # Checkout the branch that triggered the workflow | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' # Specify the Python version | |
- name: Install Python Packages | |
run: pip install PyYAML | |
- name: Run Python Script | |
run: python docs/compile_rst_categories.py | |
- name: Commit changes | |
run: | | |
git config --global user.name 'github-actions[bot]' | |
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
git add . | |
git commit -m 'Compile FAQ to documentation markdown :robot:' || exit 0 # Exit gracefully if no changes | |
git push origin ${{ github.event.workflow_run.head_branch }} |