Repository navigation
Switch to zensical #3
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: Documentation | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - main | |
| tags: | |
| - 'v*' | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Mike needs full history to manage the gh-pages branch | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install Zensical and Mike | |
| run: | | |
| pip install zensical mike | |
| - name: Configure Git | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| - name: Deploy Master to Dev | |
| if: github.ref == 'refs/heads/master' | |
| run: mike deploy --push --update-aliases dev | |
| - name: Deploy Tagged Version | |
| if: startsWith(github.ref, 'refs/tags/') | |
| run: | | |
| VERSION=${GITHUB_REF_NAME#v} | |
| mike deploy --push --update-aliases $VERSION latest |