2023-08-18 01:04:13 +02:00
|
|
|
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
|
|
|
|
|
2023-12-07 20:55:16 +01:00
|
|
|
- name: Set up Python 3.11
|
2023-08-18 01:04:13 +02:00
|
|
|
uses: actions/setup-python@v4
|
|
|
|
with:
|
2023-12-07 20:55:16 +01:00
|
|
|
python-version: 3.11
|
2023-08-18 01:04:13 +02:00
|
|
|
|
|
|
|
- name: Install Dependencies
|
|
|
|
run: |
|
|
|
|
python3 -m venv venv
|
|
|
|
source venv/bin/activate
|
|
|
|
python -m pip install --upgrade pip
|
|
|
|
pip install wheel
|
2023-12-07 22:16:19 +01:00
|
|
|
pip install -r requirements.txt
|
2023-08-18 01:04:13 +02:00
|
|
|
pip install -e .
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
- name: Generate Docs
|
|
|
|
run: |
|
|
|
|
sudo apt-get install python3-sphinx
|
|
|
|
pip install sphinxemoji sphinx_rtd_theme recommonmark
|
2023-12-07 22:16:19 +01:00
|
|
|
cd docsource && make github && cd ..
|
2023-08-18 01:04:13 +02:00
|
|
|
|
|
|
|
- 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 "actions@github.com"
|
|
|
|
git add docs/*
|
|
|
|
git commit -m "update docs [bot]"
|
|
|
|
git push
|