|
8 | 8 | required: false
|
9 | 9 | push:
|
10 | 10 | branches: docs-build
|
11 |
| -env: |
12 |
| - GRADLE_ENTERPRISE_SECRET_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }} |
13 |
| -permissions: read-all |
| 11 | + |
14 | 12 | jobs:
|
15 | 13 | build:
|
16 | 14 | if: github.repository_owner == 'spring-projects'
|
17 |
| - runs-on: ubuntu-latest |
18 |
| - steps: |
19 |
| - - name: Checkout |
20 |
| - uses: actions/checkout@v3 |
21 |
| - with: |
22 |
| - fetch-depth: 5 |
23 |
| - - name: Set Up Gradle |
24 |
| - uses: spring-io/spring-gradle-build-action@v2 |
25 |
| - with: |
26 |
| - java-version: '17' |
27 |
| - distribution: temurin |
28 |
| - - name: Set up refname build |
29 |
| - if: github.event.inputs.build-refname |
30 |
| - run: | |
31 |
| - git fetch --depth 1 https://github.com/$GITHUB_REPOSITORY ${{ github.event.inputs.build-refname }} |
32 |
| - echo BUILD_REFNAME=${{ github.event.inputs.build-refname }} >> $GITHUB_ENV |
33 |
| - echo BUILD_VERSION=$(git cat-file --textconv FETCH_HEAD:gradle.properties | sed -n '/^version=/ { s/^version=//;p }') >> $GITHUB_ENV |
34 |
| - - name: Run Antora |
35 |
| - run: ./gradlew antora |
36 |
| - - name: Copy the cache to be included in the site |
37 |
| - run: cp -rf build/antora/inject-collector-cache-config-extension/.cache build/site/ |
38 |
| - - name: Publish Docs |
39 |
| - uses: spring-io/spring-doc-actions/[email protected] |
40 |
| - with: |
41 |
| - docs-username: ${{ secrets.DOCS_USERNAME }} |
42 |
| - docs-host: ${{ secrets.DOCS_HOST }} |
43 |
| - docs-ssh-key: ${{ secrets.DOCS_SSH_KEY }} |
44 |
| - docs-ssh-host-key: ${{ secrets.DOCS_SSH_HOST_KEY }} |
45 |
| - - name: Bust Clouflare Cache |
46 |
| - uses: spring-io/spring-doc-actions/[email protected] |
47 |
| - with: |
48 |
| - context-root: spring-integration |
49 |
| - cloudflare-zone-id: ${{ secrets.CLOUDFLARE_ZONE_ID }} |
50 |
| - cloudflare-cache-token: ${{ secrets.CLOUDFLARE_CACHE_TOKEN }} |
| 15 | + uses: spring-io/spring-github-workflows/.github/workflows/spring-build-and-deploy-docs.yml@main |
| 16 | + with: |
| 17 | + build-refname: ${{ inputs.build-refname }} |
| 18 | + secrets: |
| 19 | + GRADLE_ENTERPRISE_SECRET_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }} |
| 20 | + DOCS_USERNAME: ${{ secrets.DOCS_USERNAME }} |
| 21 | + DOCS_HOST: ${{ secrets.DOCS_HOST }} |
| 22 | + DOCS_SSH_KEY: ${{ secrets.DOCS_SSH_KEY }} |
| 23 | + DOCS_SSH_HOST_KEY: ${{ secrets.DOCS_SSH_HOST_KEY }} |
| 24 | + CLOUDFLARE_ZONE_ID: ${{ secrets.CLOUDFLARE_ZONE_ID }} |
| 25 | + CLOUDFLARE_CACHE_TOKEN: ${{ secrets.CLOUDFLARE_CACHE_TOKEN }} |
0 commit comments