-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (32 loc) · 1.08 KB
/
compile_docs.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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 }}