Deploy 4.26.0-RC2 Docs #2
This file contains 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 Docs | |
run-name: Deploy ${{github.event.inputs.version || github.ref_name}} Docs | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'Release version' | |
type: string | |
workflow_call: | |
jobs: | |
deploy-docs: | |
runs-on: ubuntu-latest | |
env: | |
RELEASE_VERSION: ${{ github.event.inputs.version }} | |
steps: | |
- name: Create GitHub App Token | |
id: app-token | |
uses: actions/create-github-app-token@v1 | |
with: | |
app-id: ${{ vars.CI_APP_ID }} | |
private-key: ${{ secrets.CI_APP_PRIVATE_KEY }} | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.ref }} | |
token: ${{ steps.app-token.outputs.token }} | |
fetch-depth: 0 | |
- name: Java setup | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '21' | |
distribution: 'temurin' | |
cache: maven | |
- name: Get GitHub App User ID | |
id: get-user-id | |
run: echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT" | |
env: | |
GH_TOKEN: ${{ steps.app-token.outputs.token }} | |
- name: Configure Git author | |
run: | | |
git config --global user.name '${{ steps.app-token.outputs.app-slug }}[bot]' | |
git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com>' | |
- name: Install just | |
uses: taiki-e/install-action@just | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.9 | |
cache: 'pipenv' | |
cache-dependency-path: documentation/Pipfile.lock | |
- name: Install pipenv | |
run: pip install pipenv | |
- name: Set Release Version | |
run: | | |
echo "RELEASE_VERSION=${RELEASE_VERSION:-"$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)"}" >> $GITHUB_ENV | |
- name: Perform the deploy docs | |
run: just build-ci deploy-docs ${{ env.RELEASE_VERSION }} |