release:prepare 0.1.2 #235
Workflow file for this run
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: docs | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "docs/**" | |
| - "mkdocs.yml" | |
| - "pyproject.toml" | |
| tags: | |
| - "v*.*.*" | |
| pull_request: | |
| paths: | |
| - "docs/**" | |
| - "mkdocs.yml" | |
| - "pyproject.toml" | |
| permissions: | |
| contents: write | |
| jobs: | |
| validate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - run: pip install mkdocs-material pymdown-extensions mike | |
| - name: Build docs (strict) | |
| run: mkdocs build --strict | |
| deploy-dev: | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| needs: validate | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - run: pip install mkdocs-material pymdown-extensions mike | |
| - run: git config user.name "github-actions[bot]" | |
| - run: git config user.email "github-actions[bot]@users.noreply.github.com" | |
| - name: Deploy dev docs | |
| run: mike deploy --push --update-aliases dev | |
| deploy-release: | |
| if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | |
| needs: validate | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - run: pip install mkdocs-material pymdown-extensions mike | |
| - run: git config user.name "github-actions[bot]" | |
| - run: git config user.email "github-actions[bot]@users.noreply.github.com" | |
| - name: Deploy versioned docs | |
| run: | | |
| VERSION="${GITHUB_REF_NAME#v}" | |
| mike deploy --push --update-aliases "$VERSION" latest | |
| mike set-default --push latest |