|
| 1 | +# Generated by the rollout-deploy-docs workflow in |
| 2 | +# spring-cloud/spring-cloud-github-actions. |
| 3 | +# |
| 4 | +# Do not edit this file directly - update examples/deploy-docs.yml there |
| 5 | +# and re-run the rollout, otherwise your change will be overwritten. |
| 6 | + |
1 | 7 | name: Deploy Docs |
2 | 8 | run-name: ${{ format('{0} ({1})', github.workflow, github.event.inputs.build-refname || 'all') }} |
| 9 | + |
3 | 10 | on: |
4 | 11 | workflow_dispatch: |
5 | 12 | inputs: |
6 | 13 | build-refname: |
7 | | - description: Enter git refname to build (e.g., 5.7.x). |
| 14 | + description: Enter git refname to build (e.g., 4.3.x). |
8 | 15 | required: false |
9 | 16 | push: |
10 | 17 | branches: docs-build |
11 | | -env: |
12 | | - GRADLE_ENTERPRISE_SECRET_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }} |
13 | | -permissions: |
14 | | - contents: write |
| 18 | + |
| 19 | +permissions: read-all |
| 20 | + |
15 | 21 | jobs: |
16 | | - build: |
17 | | - if: github.repository_owner == 'spring-cloud' |
18 | | - runs-on: ubuntu-latest |
19 | | - steps: |
20 | | - - name: Checkout |
21 | | - uses: actions/checkout@v3 |
22 | | - with: |
23 | | - fetch-depth: 5 |
24 | | - - name: Set up JDK 17 |
25 | | - uses: actions/setup-java@v3 |
26 | | - with: |
27 | | - java-version: '17' |
28 | | - distribution: 'temurin' |
29 | | - - name: Set up refname build |
30 | | - if: github.event.inputs.build-refname |
31 | | - run: | |
32 | | - git fetch --depth 1 https://github.com/$GITHUB_REPOSITORY ${{ github.event.inputs.build-refname }} |
33 | | - export BUILD_REFNAME=${{ github.event.inputs.build-refname }} |
34 | | - echo "BUILD_REFNAME=$BUILD_REFNAME" >> $GITHUB_ENV |
35 | | - export BUILD_VERSION=$(git cat-file --textconv FETCH_HEAD:pom.xml | python3 -c "import xml.etree.ElementTree as xml; from sys import stdin; print(xml.parse(stdin).getroot().find('{http://maven.apache.org/POM/4.0.0}version').text)") |
36 | | - echo BUILD_VERSION=$BUILD_VERSION >> $GITHUB_ENV |
37 | | - - name: Run Antora |
38 | | - run: | |
39 | | - ./mvnw --no-transfer-progress -B antora -Pdocs |
40 | | - - name: Publish Docs |
41 | | - uses: spring-io/spring-doc-actions/rsync-antora-reference@v0.0.15 |
42 | | - with: |
43 | | - docs-username: ${{ secrets.DOCS_USERNAME }} |
44 | | - docs-host: ${{ secrets.DOCS_HOST }} |
45 | | - docs-ssh-key: ${{ secrets.DOCS_SSH_KEY }} |
46 | | - docs-ssh-host-key: ${{ secrets.DOCS_SSH_HOST_KEY }} |
47 | | - site-path: target/antora/site |
48 | | - - name: Bust Cloudflare Cache |
49 | | - uses: spring-io/spring-doc-actions/bust-cloudflare-antora-cache@v0.0.15 |
50 | | - with: |
51 | | - context-root: spring-cloud-openfeign |
52 | | - cloudflare-zone-id: ${{ secrets.CLOUDFLARE_ZONE_ID }} |
53 | | - cloudflare-cache-token: ${{ secrets.CLOUDFLARE_CACHE_TOKEN }} |
| 22 | + deploy-docs: |
| 23 | + uses: spring-cloud/spring-cloud-github-actions/.github/workflows/deploy-docs.yml@main |
| 24 | + with: |
| 25 | + build_refname: ${{ github.event.inputs.build-refname }} |
| 26 | + # Optional overrides - the defaults are correct for every current project: |
| 27 | + # java_version: '17' |
| 28 | + # build_command: './mvnw --no-transfer-progress -B antora -Pdocs' |
| 29 | + # runs_on: 'ubuntu-latest' |
| 30 | + # context_root: 'spring-cloud-<project>' |
| 31 | + secrets: inherit |
0 commit comments