@@ -56,15 +56,10 @@ commands:
56
56
export CURRENT_DEFAULT_BRANCH=`git remote show origin | grep "HEAD branch" | cut -d ":" -f 2 | xargs`
57
57
echo 'export HEROKU_RELEASE_STORYBOOK_APP_NAME=false' >> $BASH_ENV
58
58
if [[ "${CIRCLE_BRANCH}" = "${CURRENT_DEFAULT_BRANCH}" ]] ; then
59
- if [[ "${CIRCLE_TAG}" =~ ^v\d+\.\d+\.\d+-.+$ ]] ; then
60
- echo "Publishing to CORE-MAIN..."
61
- echo 'export HEROKU_APP_NAME=${HEROKU_APP_CORE_MAIN}' >> $BASH_ENV
62
- else
63
- echo "Publishing to UPCOMING..."
64
- echo 'export HEROKU_APP_NAME=${HEROKU_APP_UPCOMING}' >> $BASH_ENV
65
- echo 'export HEROKU_RELEASE_STORYBOOK_APP_NAME=storybook-upcoming' >> $BASH_ENV
66
- fi
67
- elif [[ "${CIRCLE_TAG}" =~ ^v\d+\.\d+\.\d+$ ]] ; then
59
+ echo "Publishing to UPCOMING..."
60
+ echo "Publishing to CORE-MAIN..."
61
+ echo 'export HEROKU_APP_NAME=${HEROKU_APP_CORE_MAIN}' >> $BASH_ENV
62
+ elif [[ ${CIRCLE_TAG} =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]] ; then
68
63
echo "Publishing to CORE-PATCH..."
69
64
echo 'export HEROKU_APP_NAME=${HEROKU_APP_CORE_PATCH}' >> $BASH_ENV
70
65
echo 'export HEROKU_RELEASE_STORYBOOK_APP_NAME=storybook-core-patch' >> $BASH_ENV
@@ -157,7 +152,7 @@ commands:
157
152
command : ' tar -xvf workspace/storybook.tar.gz'
158
153
- run :
159
154
name : Start server
160
- command : ' npx http-server .out '
155
+ command : ' npx http-server .www '
161
156
background : true
162
157
- run :
163
158
name : Poll until server is up
@@ -275,7 +270,7 @@ jobs:
275
270
export VERSION_FROM_TAG=$([[ ${CIRCLE_TAG} -eq "v" ]] && echo ${CIRCLE_TAG:1:20} || echo ${CIRCLE_TAG})
276
271
export SALESFORCE_VERSION=$(cat package.json | jq -r .slds.id)
277
272
export VERSION_FROM_PACKAGE=$(cat package.json | jq -r .version)
278
- curl --location --request PATCH 'https://design-systems- api.herokuapp .com/v1/release' \
273
+ curl --location --request PATCH 'https://api.lightningdesignsystem .com/v1/release' \
279
274
--header 'Content-Type: application/json' \
280
275
--header 'Authorization: Bearer ${DSE_API_RELEASE_TOKEN}' \
281
276
--data-raw '{
@@ -300,24 +295,9 @@ jobs:
300
295
name : Build static Storybook
301
296
command : ' npm run storybook:build'
302
297
303
- - run :
304
- name : ' Generate custom Nginx config'
305
- command : |
306
- cat > nginx_app.conf\<<'EOF'
307
- # Redirect all non-SSL requests
308
- if ($http_x_forwarded_proto != 'https') {
309
- return 301 https://$host$request_uri;
310
- }
311
-
312
- location / {
313
- index index.php index.html index.htm;
314
- }
315
- EOF
316
- cat nginx_app.conf
317
-
318
298
- run :
319
299
name : Archive static Storybook
320
- command : ' tar -czvf workspace/storybook.tar.gz .out / Procfile composer.json nginx_app.conf '
300
+ command : ' tar -czvf workspace/storybook.tar.gz .www / Procfile config/nginx.conf.erb heroku-start.sh app.json '
321
301
322
302
- persist_to_workspace :
323
303
root : workspace
@@ -361,7 +341,7 @@ jobs:
361
341
echo "=============================="
362
342
echo ${PUBLISH_STORYBOOK_TO}
363
343
echo "=============================="
364
- heroku buildpacks -a ${PUBLISH_STORYBOOK_TO} | grep "heroku/php " || heroku buildpacks:set heroku/php -a ${PUBLISH_STORYBOOK_TO}
344
+ heroku buildpacks -a ${PUBLISH_STORYBOOK_TO} | grep "https://github.com/salesforce-ux/heroku-buildpack-nginx.git#dse " || heroku buildpacks:set https://github.com/salesforce-ux/heroku-buildpack-nginx.git#dse -a ${PUBLISH_STORYBOOK_TO}
365
345
heroku builds:create --source-tar workspace/storybook.tar.gz -a ${PUBLISH_STORYBOOK_TO}
366
346
367
347
- install-gh-cli
@@ -417,20 +397,7 @@ jobs:
417
397
- run :
418
398
name : ' Generate site tarball'
419
399
command : |
420
- echo '{}' > composer.json
421
- echo 'web: vendor/bin/heroku-php-nginx -C nginx_app.conf .www' > Procfile
422
- cat > nginx_app.conf\<<'EOF'
423
- # Redirect all non-SSL requests
424
- if ($http_x_forwarded_proto != 'https') {
425
- return 301 https://$host$request_uri;
426
- }
427
-
428
- location / {
429
- index index.php index.html index.htm;
430
- }
431
- EOF
432
- cat nginx_app.conf
433
- tar -czvf site-next.tar.gz .www/ Procfile composer.json nginx_app.conf
400
+ tar -czvf site-next.tar.gz .www/ Procfile config/nginx.conf.erb heroku-start.sh app.json
434
401
435
402
- run :
436
403
name : ' Deploy to Heroku app'
@@ -439,7 +406,7 @@ jobs:
439
406
echo "=============================="
440
407
echo ${HEROKU_APP_NAME}
441
408
echo "=============================="
442
- heroku buildpacks -a ${HEROKU_APP_NAME} | grep "heroku/php " || heroku buildpacks:set heroku/php -a ${HEROKU_APP_NAME}
409
+ heroku buildpacks -a ${HEROKU_APP_NAME} | grep "https://github.com/salesforce-ux/heroku-buildpack-nginx.git#dse " || heroku buildpacks:set https://github.com/salesforce-ux/heroku-buildpack-nginx.git#dse -a ${HEROKU_APP_NAME}
443
410
heroku builds:create --source-tar site-next.tar.gz -a ${HEROKU_APP_NAME}
444
411
445
412
- install-gh-cli
@@ -538,10 +505,10 @@ workflows:
538
505
context : ux-eng-keys
539
506
requires :
540
507
- framework-build
541
- # only on the main version branches with a public release tag (X.X.X)
508
+ # update for all tagged versions (X.X.X[-*] )
542
509
filters :
543
510
tags :
544
- only : /^v\d+\.\d+\.\d+$ /
511
+ only : /^v\d+\.\d+\.\d+.* /
545
512
branches :
546
513
ignore : /.*/
547
514
- vrt-desktop :
0 commit comments