@@ -16,14 +16,14 @@ jobs:
1616 build-and-deploy-docs :
1717 name : Build and Deploy Documentation
1818 if : github.repository_owner == 'spring-projects'
19- runs-on : ubuntu-latest
19+ runs-on : ${{ vars.UBUNTU_SMALL || ' ubuntu-latest' }}
2020 steps :
2121 - name : Check Out
2222 uses : actions/checkout@v4
2323 with :
2424 fetch-depth : 0
2525 - name : Fetch Main Branch
26- run : git fetch origin main :main
26+ run : git fetch origin ${{ github.event.repository.default_branch }} :main
2727 - name : Set Up Node
2828 uses : actions/setup-node@v4
2929 with :
@@ -41,10 +41,15 @@ jobs:
4141 env :
4242 ARTIFACTORY_USERNAME : ${{ secrets.ARTIFACTORY_USERNAME }}
4343 ARTIFACTORY_PASSWORD : ${{ secrets.ARTIFACTORY_PASSWORD }}
44+ COMMERCIAL_REPO_USERNAME : ${{ secrets.COMMERCIAL_ARTIFACTORY_RO_USERNAME }}
45+ COMMERCIAL_REPO_PASSWORD : ${{ secrets.COMMERCIAL_ARTIFACTORY_RO_PASSWORD }}
46+ COMMERCIAL_SNAPSHOT_REPO_URL : ${{ vars.COMMERCIAL_SNAPSHOT_REPO_URL }}
47+ COMMERCIAL_RELEASE_REPO_URL : ${{ vars.COMMERCIAL_RELEASE_REPO_URL }}
4448 BUILD_REFNAME : ${{ github.event.inputs.build-refname }}
4549 BUILD_VERSION : ${{ github.event.inputs.build-version }}
4650 run : node run.js --no-checkout
47- - name : Sync Documentation
51+ - name : Sync OSS Documentation
52+ if : ${{ !vars.COMMERCIAL }}
4853 uses :
spring-io/spring-doc-actions/[email protected] 4954 with :
5055 docs-username : ${{ secrets.DOCS_USERNAME }}
@@ -55,13 +60,26 @@ jobs:
5560 env :
5661 BUILD_REFNAME : ${{ github.event.inputs.build-refname }}
5762 BUILD_VERSION : ${{ github.event.inputs.build-version }}
58- - name : Bust Cloudflare Cache
63+ - name : Bust OSS Cloudflare Cache
64+ if : ${{ !vars.COMMERCIAL }}
5965 uses :
spring-io/spring-doc-actions/[email protected] 6066 with :
6167 context-root : spring-boot
6268 context-path : /
6369 cloudflare-zone-id : ${{ secrets.CLOUDFLARE_ZONE_ID }}
6470 cloudflare-cache-token : ${{ secrets.CLOUDFLARE_CACHE_TOKEN }}
71+ - name : Authenticate for commercial distribution
72+ if : ${{ vars.COMMERCIAL }}
73+ uses :
' google-github-actions/[email protected] ' 74+ with :
75+ credentials_json : ' ${{ secrets.COMMERCIAL_DOCS_GCP_BUCKET_JSON }}'
76+ - name : Sync commercial Documentation
77+ if : ${{ vars.COMMERCIAL }}
78+ uses :
' google-github-actions/[email protected] ' 79+ with :
80+ path : ' build/site'
81+ destination : ' ${{ vars.COMMERCIAL_DOCS_HOST }}/spring-boot'
82+ parent : false
6583 - name : Send Notification
6684 if : failure()
6785 uses : ./.github/actions/send-notification
0 commit comments