Skip to content

Workflow file for this run

name: Build and Deploy Sphinx Documentation to Wiki
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install sphinx
- name: Generate API documentation
run: |
sphinx-apidoc -o docs/source /pfad/zu/deinem/modul ./test
- name: Build Sphinx documentation
run: |
cd docs
make html
- name: Deploy to GitHub Wiki
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
run: |
git clone https://github.com/${{ github.repository }}.wiki.git wiki
cd wiki
git config user.name "GitHub Actions"
git config user.email "actions@github.com"
rm -rf *
cp -r ../docs/build/html/* .
git add .
git commit -m "Update documentation"
git remote set-url origin https://x-access-token:${{ secrets.TOKEN }}@github.com/${{ github.repository }}.wiki.git
git push origin master
- name: Cleanup __pycache__ directories
run: |
find . -name '__pycache__' -exec rm -rf {} +