44 workflow_dispatch :
55 inputs :
66 env :
7- description : ' Deploy to (dev|prod|dev prod)'
7+ description : " Deploy to (dev|prod|dev prod)"
88 required : true
9- default : ' dev'
9+ default : " dev"
1010 clean :
11- description : ' Clean cache (yes|no)'
11+ description : " Clean cache (yes|no)"
1212 required : true
13- default : ' no '
13+ default : " no "
1414 excludeSubfolder :
15- description : ' Exclude a subfolder from deletion'
15+ description : " Exclude a subfolder from deletion"
1616 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
1826jobs :
1927 set-state :
2028 runs-on : ubuntu-latest
3947 result-encoding : string
4048 - name : Get branch name
4149 shell : bash
42- run : echo "##[set-output name= branch;] ${GITHUB_REF#refs/heads/}"
50+ run : echo "branch= ${GITHUB_REF#refs/heads/}" >> "$GITHUB_OUTPUT "
4351 id : get_branch
4452
4553 echo-state :
8189 - name : Setup Node v16 for Yarn v3
8290 uses : actions/setup-node@v3
8391 with :
84- node-version : ' 16.15.0' # Current LTS version
92+ node-version : " 16.15.0" # Current LTS version
8593
8694 - name : Enable Corepack for Yarn v3
8795 run : corepack enable
@@ -123,7 +131,7 @@ jobs:
123131 PATH_PREFIX : ${{ needs.set-state.outputs.path_prefix }}
124132 GATSBY_ADOBE_LAUNCH_SRC : ${{ secrets.AIO_ADOBE_LAUNCH_DEV_SRC }}
125133 GATSBY_ADDITIONAL_ADOBE_ANALYTICS_ACCOUNTS : ${{ secrets.AIO_REPORT_SUITE_DEV}}
126- GATSBY_ADOBE_ANALYTICS_ENV : ' dev'
134+ GATSBY_ADOBE_ANALYTICS_ENV : " dev"
127135 REPO_GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
128136 REPO_OWNER : ${{ github.event.repository.owner.login }}
129137 REPO_NAME : ${{ github.event.repository.name }}
@@ -140,25 +148,24 @@ jobs:
140148 GATSBY_ALGOLIA_API_KEY : ${{ secrets.AIO_ALGOLIA_API_KEY }}
141149 GATSBY_ALGOLIA_INDEX_ALL_SRC : ${{ secrets.AIO_ALGOLIA_INDEX_ALL_SRC }}
142150 GATSBY_ALGOLIA_SEARCH_INDEX : ${{ secrets.AIO_ALGOLIA_SEARCH_INDEX }}
151+ GATSBY_ALGOLIA_INDEX_ENV_PREFIX : ${{ secrets.AIO_ALGOLIA_INDEX_ENV_PREFIX }}
143152 GATSBY_FEDS_PRIVACY_ID : ${{ secrets.AIO_FEDS_PRIVACY_ID }}
153+ GATSBY_SITE_DOMAIN_URL : https://developer-stage.adobe.com
144154
145155 - name : Deploy
146156 uses : AdobeDocs/static-website-deploy@master
147157 with :
148- enabled-static-website : ' true'
149- source : ' public'
158+ enabled-static-website : " true"
159+ source : " public"
150160 target : ${{ needs.set-state.outputs.path_prefix }}
151161 connection-string : ${{ secrets.AIO_AZURE_DEV_CONNECTION_STRING }}
152- remove-existing-files : ' true'
162+ remove-existing-files : " true"
153163 exclude-subfolder : ${{ needs.set-state.outputs.exclude_subfolder }}
154- - name : Delay purge
155- run : sleep 60s
156- shell : bash
157164 - name : Purge Fastly Cache
158165 uses : AdobeDocs/gatsby-fastly-purge-action@master
159166 with :
160167 fastly-token : ${{ secrets.AIO_FASTLY_TOKEN }}
161- 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 }}"
162169
163170 pre-build-production :
164171 needs : [set-state]
@@ -186,7 +193,7 @@ jobs:
186193 - name : Setup Node v16 for Yarn v3
187194 uses : actions/setup-node@v3
188195 with :
189- node-version : ' 16.15.0' # Current LTS version
196+ node-version : " 16.15.0" # Current LTS version
190197
191198 - name : Enable Corepack for Yarn v3
192199 run : corepack enable
@@ -228,7 +235,7 @@ jobs:
228235 PATH_PREFIX : ${{ needs.set-state.outputs.path_prefix }}
229236 GATSBY_ADOBE_LAUNCH_SRC : ${{ secrets.AIO_ADOBE_LAUNCH_PROD_SRC }}
230237 GATSBY_ADDITIONAL_ADOBE_ANALYTICS_ACCOUNTS : ${{ secrets.AIO_REPORT_SUITE_PROD }}
231- GATSBY_ADOBE_ANALYTICS_ENV : ' production'
238+ GATSBY_ADOBE_ANALYTICS_ENV : " production"
232239 REPO_GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
233240 REPO_OWNER : ${{ github.event.repository.owner.login }}
234241 REPO_NAME : ${{ github.event.repository.name }}
@@ -244,25 +251,24 @@ jobs:
244251 GATSBY_ALGOLIA_APP_ID : ${{ secrets.AIO_ALGOLIA_APP_ID }}
245252 GATSBY_ALGOLIA_API_KEY : ${{ secrets.AIO_ALGOLIA_API_KEY }}
246253 ALGOLIA_WRITE_API_KEY : ${{ secrets.AIO_ALGOLIA_WRITE_API_KEY }}
247- ALGOLIA_INDEXATION_MODE : ${{ secrets.AIO_ALGOLIA_INDEXATION_MODE }}
248- 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 }}
249256 GATSBY_ALGOLIA_INDEX_ALL_SRC : ${{ secrets.AIO_ALGOLIA_INDEX_ALL_SRC }}
250257 GATSBY_ALGOLIA_SEARCH_INDEX : ${{ secrets.AIO_ALGOLIA_SEARCH_INDEX }}
258+ GATSBY_ALGOLIA_INDEX_ENV_PREFIX : ${{ secrets.AIO_ALGOLIA_INDEX_ENV_PREFIX }}
251259 GATSBY_FEDS_PRIVACY_ID : ${{ secrets.AIO_FEDS_PRIVACY_ID }}
260+ GATSBY_SITE_DOMAIN_URL : https://developer.adobe.com
252261 - name : Deploy
253262 uses : AdobeDocs/static-website-deploy@master
254263 with :
255- enabled-static-website : ' true'
256- source : ' public'
264+ enabled-static-website : " true"
265+ source : " public"
257266 target : ${{ needs.set-state.outputs.path_prefix }}
258267 connection-string : ${{ secrets.AIO_AZURE_PROD_CONNECTION_STRING }}
259- remove-existing-files : ' true'
268+ remove-existing-files : " true"
260269 exclude-subfolder : ${{ needs.set-state.outputs.exclude_subfolder }}
261- - name : Delay purge
262- run : sleep 60s
263- shell : bash
264270 - name : Purge Fastly Cache
265271 uses : AdobeDocs/gatsby-fastly-purge-action@master
266272 with :
267273 fastly-token : ${{ secrets.AIO_FASTLY_TOKEN }}
268- 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