|
| 1 | +name: Deploy Docs Ad Hoc |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + workflow_dispatch: |
| 6 | + inputs: |
| 7 | + branch-or-tag: |
| 8 | + description: 'Branch or tag name to deploy docs for (e.g. v2.0.0)' |
| 9 | + required: true |
| 10 | + type: string |
| 11 | +env: |
| 12 | + GCHAT_WEBHOOK_URL: ${{ secrets.SPRING_RELEASE_GCHAT_WEBHOOK_URL }} |
| 13 | + DEVELOCITY_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }} |
| 14 | + COMMIT_OWNER: ${{ github.event.pusher.name }} |
| 15 | + COMMIT_SHA: ${{ github.sha }} |
| 16 | + ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }} |
| 17 | + ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }} |
| 18 | + GH_TOKEN: ${{ secrets.GH_ACTIONS_REPO_TOKEN }} |
| 19 | + |
| 20 | +jobs: |
| 21 | + deploy_docs_artifactory: |
| 22 | + name: Deploy Docs To Artifactory |
| 23 | + runs-on: ubuntu-latest |
| 24 | + if: github.repository == 'spring-projects/spring-pulsar' |
| 25 | + steps: |
| 26 | + - uses: actions/checkout@v5 |
| 27 | + with: |
| 28 | + ref: ${{ inputs.branch-or-tag }} |
| 29 | + - uses: spring-io/spring-gradle-build-action@v2 |
| 30 | + with: |
| 31 | + java-version: '25' |
| 32 | + distribution: 'liberica' |
| 33 | + - name: Publish docs module to Artifactory |
| 34 | + env: |
| 35 | + ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_PRIVATE_KEY }} |
| 36 | + ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_PASSPHRASE }} |
| 37 | + ARTIFACTORY_BUILD_NAME: ${{ github.event.repository.name }}-${{ steps.branch-name.outputs.branch }} |
| 38 | + ARTIFACTORY_BUILD_NUMBER: ${{ github.run_id }} |
| 39 | + ARTIFACTORY_BUILD_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} |
| 40 | + ARTIFACTORY_USER_AGENT_NAME: GitHub Actions |
| 41 | + ARTIFACTORY_USER_AGENT_VERSION: Unknown |
| 42 | + ARTIFACTORY_VCS_REVISION: ${{ github.sha }} |
| 43 | + run: | |
| 44 | + ./gradlew :spring-pulsar-docs:artifactoryPublish \ |
| 45 | + --stacktrace \ |
| 46 | + -PartifactoryUsername="$ARTIFACTORY_USERNAME" -PartifactoryPassword="$ARTIFACTORY_PASSWORD" |
| 47 | + deploy_docs_antora: |
| 48 | + name: Deploy Antora Docs |
| 49 | + runs-on: ubuntu-latest |
| 50 | + if: github.repository == 'spring-projects/spring-pulsar' |
| 51 | + steps: |
| 52 | + - uses: actions/checkout@v5 |
| 53 | + with: |
| 54 | + ref: ${{ inputs.branch-or-tag }} |
| 55 | + - uses: spring-io/spring-gradle-build-action@v2 |
| 56 | + with: |
| 57 | + java-version: '25' |
| 58 | + distribution: 'liberica' |
| 59 | + - name: Run Antora |
| 60 | + run: | |
| 61 | + ./gradlew antora |
| 62 | + - name: Publish Docs |
| 63 | + uses: spring-io/spring-doc-actions/[email protected] |
| 64 | + with: |
| 65 | + docs-username: ${{ secrets.DOCS_USERNAME }} |
| 66 | + docs-host: ${{ secrets.DOCS_HOST }} |
| 67 | + docs-ssh-key: ${{ secrets.DOCS_SSH_KEY }} |
| 68 | + docs-ssh-host-key: ${{ secrets.DOCS_SSH_HOST_KEY }} |
| 69 | + site-path: spring-pulsar-docs/build/site |
| 70 | + - name: Bust Clouflare Cache |
| 71 | + uses: spring-io/spring-doc-actions/[email protected] |
| 72 | + with: |
| 73 | + context-root: spring-pulsar |
| 74 | + cloudflare-zone-id: ${{ secrets.CLOUDFLARE_ZONE_ID }} |
| 75 | + cloudflare-cache-token: ${{ secrets.CLOUDFLARE_CACHE_TOKEN }} |
0 commit comments