Workflow (should work!) #7
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: Documentation | |
on: | |
push: | |
branches: | |
- main # or your default branch | |
jobs: | |
setup-environment: | |
uses: ./.github/workflows/setup_env.yml | |
build-documentation: | |
runs-on: ubuntu-latest | |
needs: setup-environment | |
steps: | |
- name: Generate Documentation | |
run: | | |
rm -r docs/ | |
pdoc --force --template-dir templates -o docs --html mimir | |
mv docs/mimir/* docs/ | |
rm -r docs/mimir | |
- name: Commit and Push Documentation | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Actions" | |
git add docs/ | |
git commit -m "Update documentation" -a || exit 0 # Exit if nothing to commit | |
git push https://${{ secrets.MIMIR_PAT }}@github.com/${{ github.repository }}.git |