this and that #217
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 docs | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
update-docs: | |
name: update docs | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
with: | |
ref: main | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 | |
- name: Install Dependencies & generate Docs | |
run: | | |
sudo apt-get install python3-sphinx | |
python3 -m venv venv | |
source venv/bin/activate | |
python -m pip install --upgrade pip | |
pip install wheel | |
pip install -r requirements.txt | |
pip install -e . | |
pip install sphinxemoji sphinx_rtd_theme recommonmark | |
cd docsource && make github && cd .. | |
- name: Check if there are any changes | |
id: verify_diff | |
run: | | |
git diff --quiet . || echo "changed=true" >> $GITHUB_OUTPUT | |
- name: push docs | |
if: steps.verify_diff.outputs.changed == 'true' | |
run: | | |
git config user.name "github-actions" | |
git config user.email "[email protected]" | |
git add docs/* | |
git commit -m "update docs [bot]" | |
git push |