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 : ' '
17
+ default : " "
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,22 +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
NODE_OPTIONS : " --max_old_space_size=8192"
146
-
147
155
- name : Deploy
148
156
uses : AdobeDocs/static-website-deploy@master
149
157
with :
150
- enabled-static-website : ' true'
151
- source : ' public'
158
+ enabled-static-website : " true"
159
+ source : " public"
152
160
target : ${{ needs.set-state.outputs.path_prefix }}
153
161
connection-string : ${{ secrets.AIO_AZURE_DEV_CONNECTION_STRING }}
154
- remove-existing-files : ' true'
162
+ remove-existing-files : " true"
155
163
exclude-subfolder : ${{ needs.set-state.outputs.exclude_subfolder }}
156
164
- name : Purge Fastly Cache
157
165
uses : AdobeDocs/gatsby-fastly-purge-action@master
158
166
with :
159
167
fastly-token : ${{ secrets.AIO_FASTLY_TOKEN }}
160
- 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 }}"
161
169
162
170
pre-build-production :
163
171
needs : [set-state]
@@ -185,7 +193,7 @@ jobs:
185
193
- name : Setup Node v16 for Yarn v3
186
194
uses : actions/setup-node@v3
187
195
with :
188
- node-version : ' 16.15.0' # Current LTS version
196
+ node-version : " 16.15.0" # Current LTS version
189
197
190
198
- name : Enable Corepack for Yarn v3
191
199
run : corepack enable
@@ -227,7 +235,7 @@ jobs:
227
235
PATH_PREFIX : ${{ needs.set-state.outputs.path_prefix }}
228
236
GATSBY_ADOBE_LAUNCH_SRC : ${{ secrets.AIO_ADOBE_LAUNCH_PROD_SRC }}
229
237
GATSBY_ADDITIONAL_ADOBE_ANALYTICS_ACCOUNTS : ${{ secrets.AIO_REPORT_SUITE_PROD }}
230
- GATSBY_ADOBE_ANALYTICS_ENV : ' production'
238
+ GATSBY_ADOBE_ANALYTICS_ENV : " production"
231
239
REPO_GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
232
240
REPO_OWNER : ${{ github.event.repository.owner.login }}
233
241
REPO_NAME : ${{ github.event.repository.name }}
@@ -243,25 +251,25 @@ jobs:
243
251
GATSBY_ALGOLIA_APP_ID : ${{ secrets.AIO_ALGOLIA_APP_ID }}
244
252
GATSBY_ALGOLIA_API_KEY : ${{ secrets.AIO_ALGOLIA_API_KEY }}
245
253
ALGOLIA_WRITE_API_KEY : ${{ secrets.AIO_ALGOLIA_WRITE_API_KEY }}
246
- ALGOLIA_INDEXATION_MODE : ${{ secrets.AIO_ALGOLIA_INDEXATION_MODE }}
247
- 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 }}
248
256
GATSBY_ALGOLIA_INDEX_ALL_SRC : ${{ secrets.AIO_ALGOLIA_INDEX_ALL_SRC }}
249
257
GATSBY_ALGOLIA_SEARCH_INDEX : ${{ secrets.AIO_ALGOLIA_SEARCH_INDEX }}
250
258
GATSBY_ALGOLIA_INDEX_ENV_PREFIX : ${{ secrets.AIO_ALGOLIA_INDEX_ENV_PREFIX }}
251
259
GATSBY_FEDS_PRIVACY_ID : ${{ secrets.AIO_FEDS_PRIVACY_ID }}
260
+ GATSBY_SITE_DOMAIN_URL : https://developer.adobe.com
252
261
NODE_OPTIONS : " --max_old_space_size=8192"
253
-
254
262
- name : Deploy
255
263
uses : AdobeDocs/static-website-deploy@master
256
264
with :
257
- enabled-static-website : ' true'
258
- source : ' public'
265
+ enabled-static-website : " true"
266
+ source : " public"
259
267
target : ${{ needs.set-state.outputs.path_prefix }}
260
268
connection-string : ${{ secrets.AIO_AZURE_PROD_CONNECTION_STRING }}
261
- remove-existing-files : ' true'
269
+ remove-existing-files : " true"
262
270
exclude-subfolder : ${{ needs.set-state.outputs.exclude_subfolder }}
263
271
- name : Purge Fastly Cache
264
272
uses : AdobeDocs/gatsby-fastly-purge-action@master
265
273
with :
266
274
fastly-token : ${{ secrets.AIO_FASTLY_TOKEN }}
267
- fastly-url : ' ${{ secrets.AIO_FASTLY_PROD_URL }}${{ needs.set-state.outputs.path_prefix }}'
275
+ fastly-url : " ${{ secrets.AIO_FASTLY_PROD_URL }}${{ needs.set-state.outputs.path_prefix }}"
0 commit comments