2021-11-07 20:50:55 +00:00
|
|
|
name: docs
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2021-11-07 20:52:17 +00:00
|
|
|
- develop
|
2021-11-07 20:50:55 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
docs:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Set up Python environment
|
2024-02-06 17:54:33 +01:00
|
|
|
uses: actions/setup-python@v5
|
2021-11-07 20:50:55 +00:00
|
|
|
with:
|
2022-11-30 17:53:17 +00:00
|
|
|
python-version: "3.10"
|
2024-02-06 17:54:33 +01:00
|
|
|
- uses: actions/checkout@v4
|
2021-11-07 20:50:55 +00:00
|
|
|
- name: Updated documentation
|
|
|
|
run: |
|
|
|
|
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
|
|
|
|
git config --global user.name "${{ github.actor }}"
|
|
|
|
git fetch origin documentation
|
|
|
|
git checkout documentation
|
|
|
|
git pull
|
|
|
|
git merge --allow-unrelated-histories -X theirs develop
|
|
|
|
python -m pip install --upgrade pip
|
|
|
|
pip install wheel
|
|
|
|
pip install .
|
|
|
|
pip install pdoc
|
|
|
|
echo $(ls -l docs)
|
|
|
|
pdoc --docformat numpy --math -o ./docs ./pyerrors
|
|
|
|
echo $(ls -l docs)
|
|
|
|
git add docs
|
|
|
|
if [ -n "$(git diff --cached --exit-code)" ]; then git commit -am "Documentation updated"; git push; fi
|