Skip to content

Commit aa65db8

Browse files
authored
ci(storybook) Tweak to correctly push to Storybook sites (#4714)
* ci(storybook) Tweak to correctly push to Storybook sites * Add a bit of logging/debugging * Use updated Github CLI syntax for pull-request info
1 parent e0ff48e commit aa65db8

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.circleci/config.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,18 +64,20 @@ commands:
6464
if [[ "${CIRCLE_BRANCH}" = "${CURRENT_DEFAULT_BRANCH}" ]] ; then
6565
echo "Publishing to UPCOMING..."
6666
echo 'export HEROKU_APP_NAME=${HEROKU_APP_UPCOMING}' >> $BASH_ENV
67+
echo 'export HEROKU_RELEASE_STORYBOOK_APP_NAME=storybook-upcoming' >> $BASH_ENV
6768
elif [[ ${CIRCLE_TAG} =~ ^v[0-9]+\.[0-9]+\.[0-9]+-.+$ ]] ; then
6869
echo "Publishing to CORE-MAIN..."
6970
echo 'export HEROKU_APP_NAME=${HEROKU_APP_CORE_MAIN}' >> $BASH_ENV
71+
echo 'export HEROKU_RELEASE_STORYBOOK_APP_NAME=storybook-core-main' >> $BASH_ENV
7072
elif [[ ${CIRCLE_TAG} =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]] ; then
7173
echo "Publishing to CORE-PATCH..."
7274
echo 'export HEROKU_APP_NAME=${HEROKU_APP_CORE_PATCH}' >> $BASH_ENV
75+
echo 'export HEROKU_RELEASE_STORYBOOK_APP_NAME=storybook-core-patch' >> $BASH_ENV
7376
else
7477
echo "Publishing to pull-request review app..."
7578
echo 'export HEROKU_APP_NAME=slds-review-site-pr-${PR_NUMBER}' >> $BASH_ENV
7679
echo 'export HEROKU_RELEASE_STORYBOOK_APP_NAME=true' >> $BASH_ENV
7780
fi
78-
echo 'export HEROKU_RELEASE_STORYBOOK_APP_NAME=${HEROKU_APP_NAME}' >> $BASH_ENV
7981
source $BASH_ENV
8082
echo $HEROKU_APP_NAME > workspace/heroku-app-name.txt
8183
echo $HEROKU_RELEASE_STORYBOOK_APP_NAME > workspace/heroku-release-storybook-app-name.txt
@@ -200,7 +202,11 @@ jobs:
200202
- run:
201203
name: Get Github pull-request number
202204
command: |
203-
gh api /repos/salesforce-ux/design-system-internal/commits/${CIRCLE_SHA1}/pulls -H "Accept: application/vnd.github.groot-preview+json" | jq -r '.[].number' > workspace/gh-pr-num.txt && cat workspace/gh-pr-num.txt
205+
gh pr view --json number,state,title,url > gh-pull-data.json
206+
echo "=== Github pull-request API results ==="
207+
cat gh-pull-data.json
208+
echo "---------------------------------------"
209+
cat gh-pull-data.json | jq -r '.number' > workspace/gh-pr-num.txt && cat workspace/gh-pr-num.txt
204210
205211
- persist_to_workspace:
206212
root: workspace

0 commit comments

Comments
 (0)