github-pages documentation #5
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: Build Documentation | |
| on: | |
| release: | |
| types: [published] | |
| workflow_dispatch: | |
| inputs: | |
| selected_version: | |
| description: 'Tag to associate with current working tree. If unset, `git describe` is used.' | |
| type: string | |
| required: false | |
| pull_request: # TODO | |
| jobs: | |
| build: | |
| name: Build documentation | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Temurin JDK 21 | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: temurin | |
| java-version: '21' | |
| cache: maven | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| - name: Install just | |
| run: sudo apt install -y just | |
| - name: Build documentation (explicit selected version) | |
| if: github.event_name == 'workflow_dispatch' && inputs.selected_version | |
| run: cd docs && just latest_version=${{ inputs.selected_version }} all | |
| - name: Build documentation | |
| if: github.event_name != 'workflow_dispatch' || !inputs.selected_version | |
| run: cd docs && just all | |
| - name: Publish | |
| uses: cloudflare/wrangler-action@v3 | |
| id: cf_publish | |
| with: | |
| apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| command: pages deploy docs/target/site/ --project-name=lz4-java-yawk-at | |
| - name: Check PR | |
| uses: 8BitJonny/[email protected] | |
| id: pr | |
| - name: Comment on PR | |
| if: steps.pr.outputs.pr_found | |
| uses: thollander/actions-comment-pull-request@v3 | |
| with: | |
| message: ":rocket: Preview deployed to ${{steps.cf_publish.outputs.deployment-url}}" | |
| comment-tag: deployment | |
| pr-number: "${{steps.pr.outputs.number}}" |