Merge pull request #252 from DigitalPebble/239 #131
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: Deploy documentation to GH pages | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'docs/**' | |
| - '.github/workflows/documentation.yml' | |
| release: | |
| types: [published] | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: gh-pages | |
| cancel-in-progress: false | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: 3.x | |
| - run: pip install zensical "mike @ git+https://github.com/squidfunk/mike.git" | |
| - name: Configure git identity | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| - name: Deploy dev version from main | |
| if: github.ref == 'refs/heads/main' | |
| run: cd docs && mike deploy --push --update-aliases dev | |
| - name: Deploy released version from release tag | |
| if: github.event_name == 'release' && !github.event.release.prerelease | |
| run: | | |
| cd docs | |
| mike deploy --push --update-aliases "${{ github.event.release.tag_name }}" latest | |
| mike set-default --push latest |