fix: try making gh pages automatic... #12
This file contains hidden or 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: Generate md files | |
| on: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| mkdoc: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Configure Git Credentials # taken from material for mkdocs | |
| run: | | |
| git config user.name github-actions[bot] | |
| git config user.email 41898282+github-actions[bot]@users.noreply.github.com | |
| - name: Set up Python | |
| uses: actions/setup-python@v3 | |
| with: | |
| python-version: '3.x' | |
| - name: install self | |
| run: | | |
| pip install . | |
| - name: new branch | |
| run: | | |
| git checkout --orphan automated_mkdocs | |
| - name: build docs | |
| run: python docgen/main.py | |
| - name: debug | |
| run: | | |
| ls | |
| echo "-------------------" | |
| cd docs | |
| ls | |
| - name: push to new gh branch | |
| run: | | |
| git reset HEAD -- . | |
| git add docs/*.md | |
| git add mkdocs.yml | |
| git commit -m "automated docs" | |
| git push --set-upstream origin automated_mkdocs --force |