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 "actions@github.com" git add docs/* git commit -m "update docs [bot]" git push