@@ -16,14 +16,14 @@ jobs:
16
16
build-and-deploy-docs :
17
17
name : Build and Deploy Documentation
18
18
if : github.repository_owner == 'spring-projects'
19
- runs-on : ubuntu-latest
19
+ runs-on : ${{ vars.UBUNTU_SMALL || ' ubuntu-latest' }}
20
20
steps :
21
21
- name : Check Out
22
22
uses : actions/checkout@v4
23
23
with :
24
24
fetch-depth : 0
25
25
- name : Fetch Main Branch
26
- run : git fetch origin main :main
26
+ run : git fetch origin ${{ github.event.repository.default_branch }} :main
27
27
- name : Set Up Node
28
28
uses : actions/setup-node@v4
29
29
with :
@@ -41,10 +41,15 @@ jobs:
41
41
env :
42
42
ARTIFACTORY_USERNAME : ${{ secrets.ARTIFACTORY_USERNAME }}
43
43
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 }}
44
48
BUILD_REFNAME : ${{ github.event.inputs.build-refname }}
45
49
BUILD_VERSION : ${{ github.event.inputs.build-version }}
46
50
run : node run.js --no-checkout
47
- - name : Sync Documentation
51
+ - name : Sync OSS Documentation
52
+ if : ${{ !vars.COMMERCIAL }}
48
53
uses :
spring-io/spring-doc-actions/[email protected]
49
54
with :
50
55
docs-username : ${{ secrets.DOCS_USERNAME }}
@@ -55,13 +60,26 @@ jobs:
55
60
env :
56
61
BUILD_REFNAME : ${{ github.event.inputs.build-refname }}
57
62
BUILD_VERSION : ${{ github.event.inputs.build-version }}
58
- - name : Bust Cloudflare Cache
63
+ - name : Bust OSS Cloudflare Cache
64
+ if : ${{ !vars.COMMERCIAL }}
59
65
uses :
spring-io/spring-doc-actions/[email protected]
60
66
with :
61
67
context-root : spring-boot
62
68
context-path : /
63
69
cloudflare-zone-id : ${{ secrets.CLOUDFLARE_ZONE_ID }}
64
70
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
65
83
- name : Send Notification
66
84
if : failure()
67
85
uses : ./.github/actions/send-notification
0 commit comments