Bump version to 0.1.5 #23
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: Publish documentation | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - v* | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: gh-pages-deploy | |
| cancel-in-progress: false | |
| jobs: | |
| deploy_docs: | |
| if: github.repository == 'mrmans0n/asyncresult' | |
| runs-on: ubuntu-latest | |
| env: | |
| TERM: dumb | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup JDK | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '17' | |
| - uses: gradle/actions/setup-gradle@v4 | |
| - name: Generate API docs | |
| run: ./gradlew :dokkaGenerate | |
| - name: Setup uv | |
| uses: astral-sh/setup-uv@v5 | |
| - name: Install dependencies | |
| run: uv sync --frozen | |
| - name: Configure Git | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| - name: Fetch gh-pages branch | |
| run: git fetch origin gh-pages:gh-pages || true | |
| - name: Determine version | |
| id: version | |
| run: | | |
| if [[ "${{ github.ref }}" == refs/tags/v* ]]; then | |
| # Extract version from tag (remove 'v' prefix) | |
| VERSION="${GITHUB_REF#refs/tags/v}" | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| echo "alias=latest" >> $GITHUB_OUTPUT | |
| echo "is_stable=true" >> $GITHUB_OUTPUT | |
| else | |
| # Main branch = next/development version | |
| echo "version=next" >> $GITHUB_OUTPUT | |
| echo "alias=" >> $GITHUB_OUTPUT | |
| echo "is_stable=false" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Deploy documentation (stable version) | |
| if: steps.version.outputs.is_stable == 'true' | |
| run: | | |
| uv run mike deploy --push --update-aliases ${{ steps.version.outputs.version }} ${{ steps.version.outputs.alias }} | |
| uv run mike set-default --push latest | |
| - name: Deploy documentation (development version) | |
| if: steps.version.outputs.is_stable == 'false' | |
| run: | | |
| uv run mike deploy --push ${{ steps.version.outputs.version }} |