4
4
workflow_dispatch :
5
5
inputs :
6
6
env :
7
- description : ' Deploy to (dev|prod|dev prod)'
7
+ description : " Deploy to (dev|prod|dev prod)"
8
8
required : true
9
- default : ' dev'
9
+ default : " dev"
10
10
clean :
11
- description : ' Clean cache (yes|no)'
11
+ description : " Clean cache (yes|no)"
12
12
required : true
13
- default : ' no '
13
+ default : " no "
14
14
excludeSubfolder :
15
- description : ' Exclude a subfolder from deletion'
15
+ description : " Exclude a subfolder from deletion"
16
16
required : false
17
- default : ' 2021, 2023'
17
+ default : " 2021, 2023"
18
+ index-mode :
19
+ description : ' Type of indexing. "index" to push to Algolia, "console" for dry run.'
20
+ required : true
21
+ default : " index"
22
+ type : choice
23
+ options :
24
+ - console
25
+ - index
18
26
jobs :
19
27
set-state :
20
28
runs-on : ubuntu-latest
39
47
result-encoding : string
40
48
- name : Get branch name
41
49
shell : bash
42
- run : echo "##[set-output name= branch;] ${GITHUB_REF#refs/heads/}"
50
+ run : echo "branch= ${GITHUB_REF#refs/heads/}" >> "$GITHUB_OUTPUT "
43
51
id : get_branch
44
52
45
53
echo-state :
81
89
- name : Setup Node v16 for Yarn v3
82
90
uses : actions/setup-node@v3
83
91
with :
84
- node-version : ' 16.15.0' # Current LTS version
92
+ node-version : " 16.15.0" # Current LTS version
85
93
86
94
- name : Enable Corepack for Yarn v3
87
95
run : corepack enable
@@ -123,7 +131,7 @@ jobs:
123
131
PATH_PREFIX : ${{ needs.set-state.outputs.path_prefix }}
124
132
GATSBY_ADOBE_LAUNCH_SRC : ${{ secrets.AIO_ADOBE_LAUNCH_DEV_SRC }}
125
133
GATSBY_ADDITIONAL_ADOBE_ANALYTICS_ACCOUNTS : ${{ secrets.AIO_REPORT_SUITE_DEV}}
126
- GATSBY_ADOBE_ANALYTICS_ENV : ' dev'
134
+ GATSBY_ADOBE_ANALYTICS_ENV : " dev"
127
135
REPO_GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
128
136
REPO_OWNER : ${{ github.event.repository.owner.login }}
129
137
REPO_NAME : ${{ github.event.repository.name }}
@@ -142,24 +150,22 @@ jobs:
142
150
GATSBY_ALGOLIA_SEARCH_INDEX : ${{ secrets.AIO_ALGOLIA_SEARCH_INDEX }}
143
151
GATSBY_ALGOLIA_INDEX_ENV_PREFIX : ${{ secrets.AIO_ALGOLIA_INDEX_ENV_PREFIX }}
144
152
GATSBY_FEDS_PRIVACY_ID : ${{ secrets.AIO_FEDS_PRIVACY_ID }}
153
+ GATSBY_SITE_DOMAIN_URL : https://developer-stage.adobe.com
145
154
146
155
- name : Deploy
147
156
uses : AdobeDocs/static-website-deploy@master
148
157
with :
149
- enabled-static-website : ' true'
150
- source : ' public'
158
+ enabled-static-website : " true"
159
+ source : " public"
151
160
target : ${{ needs.set-state.outputs.path_prefix }}
152
161
connection-string : ${{ secrets.AIO_AZURE_DEV_CONNECTION_STRING }}
153
- remove-existing-files : ' true'
162
+ remove-existing-files : " true"
154
163
exclude-subfolder : ${{ needs.set-state.outputs.exclude_subfolder }}
155
- - name : Delay purge
156
- run : sleep 60s
157
- shell : bash
158
164
- name : Purge Fastly Cache
159
165
uses : AdobeDocs/gatsby-fastly-purge-action@master
160
166
with :
161
167
fastly-token : ${{ secrets.AIO_FASTLY_TOKEN }}
162
- fastly-url : ' ${{ secrets.AIO_FASTLY_DEV_URL}}${{ needs.set-state.outputs.path_prefix }}'
168
+ fastly-url : " ${{ secrets.AIO_FASTLY_DEV_URL}}${{ needs.set-state.outputs.path_prefix }}"
163
169
164
170
pre-build-production :
165
171
needs : [set-state]
@@ -187,7 +193,7 @@ jobs:
187
193
- name : Setup Node v16 for Yarn v3
188
194
uses : actions/setup-node@v3
189
195
with :
190
- node-version : ' 16.15.0' # Current LTS version
196
+ node-version : " 16.15.0" # Current LTS version
191
197
192
198
- name : Enable Corepack for Yarn v3
193
199
run : corepack enable
@@ -229,7 +235,7 @@ jobs:
229
235
PATH_PREFIX : ${{ needs.set-state.outputs.path_prefix }}
230
236
GATSBY_ADOBE_LAUNCH_SRC : ${{ secrets.AIO_ADOBE_LAUNCH_PROD_SRC }}
231
237
GATSBY_ADDITIONAL_ADOBE_ANALYTICS_ACCOUNTS : ${{ secrets.AIO_REPORT_SUITE_PROD }}
232
- GATSBY_ADOBE_ANALYTICS_ENV : ' production'
238
+ GATSBY_ADOBE_ANALYTICS_ENV : " production"
233
239
REPO_GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
234
240
REPO_OWNER : ${{ github.event.repository.owner.login }}
235
241
REPO_NAME : ${{ github.event.repository.name }}
@@ -245,26 +251,24 @@ jobs:
245
251
GATSBY_ALGOLIA_APP_ID : ${{ secrets.AIO_ALGOLIA_APP_ID }}
246
252
GATSBY_ALGOLIA_API_KEY : ${{ secrets.AIO_ALGOLIA_API_KEY }}
247
253
ALGOLIA_WRITE_API_KEY : ${{ secrets.AIO_ALGOLIA_WRITE_API_KEY }}
248
- ALGOLIA_INDEXATION_MODE : ${{ secrets.AIO_ALGOLIA_INDEXATION_MODE }}
249
- ALGOLIA_INDEX_NAME : ${{ secrets.ALGOLIA_INDEX_NAME || github.event.repository.name }}
254
+ ALGOLIA_INDEXATION_MODE : ${{ github.event.inputs.index-mode || 'index' }}
255
+ GATSBY_ALGOLIA_INDEX_NAME : ${{ secrets.ALGOLIA_INDEX_NAME || github.event.repository.name }}
250
256
GATSBY_ALGOLIA_INDEX_ALL_SRC : ${{ secrets.AIO_ALGOLIA_INDEX_ALL_SRC }}
251
257
GATSBY_ALGOLIA_SEARCH_INDEX : ${{ secrets.AIO_ALGOLIA_SEARCH_INDEX }}
252
258
GATSBY_ALGOLIA_INDEX_ENV_PREFIX : ${{ secrets.AIO_ALGOLIA_INDEX_ENV_PREFIX }}
253
259
GATSBY_FEDS_PRIVACY_ID : ${{ secrets.AIO_FEDS_PRIVACY_ID }}
260
+ GATSBY_SITE_DOMAIN_URL : https://developer.adobe.com
254
261
- name : Deploy
255
262
uses : AdobeDocs/static-website-deploy@master
256
263
with :
257
- enabled-static-website : ' true'
258
- source : ' public'
264
+ enabled-static-website : " true"
265
+ source : " public"
259
266
target : ${{ needs.set-state.outputs.path_prefix }}
260
267
connection-string : ${{ secrets.AIO_AZURE_PROD_CONNECTION_STRING }}
261
- remove-existing-files : ' true'
268
+ remove-existing-files : " true"
262
269
exclude-subfolder : ${{ needs.set-state.outputs.exclude_subfolder }}
263
- - name : Delay purge
264
- run : sleep 60s
265
- shell : bash
266
270
- name : Purge Fastly Cache
267
271
uses : AdobeDocs/gatsby-fastly-purge-action@master
268
272
with :
269
273
fastly-token : ${{ secrets.AIO_FASTLY_TOKEN }}
270
- fastly-url : ' ${{ secrets.AIO_FASTLY_PROD_URL }}${{ needs.set-state.outputs.path_prefix }}'
274
+ fastly-url : " ${{ secrets.AIO_FASTLY_PROD_URL }}${{ needs.set-state.outputs.path_prefix }}"
0 commit comments