fix version when push on main #9
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 versioned docs | |
| on: | |
| release: | |
| types: [published] | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: write | |
| jobs: | |
| deploy-docs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo (full history) | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.13" | |
| - name: Install dependencies | |
| run: | | |
| pip install mkdocs-material mike | |
| pip install . # optional if docs import your package | |
| - name: Deploy docs | |
| working-directory: docs/ | |
| run: | | |
| git config user.name edogiuili | |
| git config user.email edoardogiuili@gmail.com | |
| if [ "${{ github.event_name }}" = "release" ]; then | |
| mike deploy "${{ github.event.release.tag_name }}" latest --push --update-aliases | |
| else | |
| mike deploy latest --push | |
| fi |