Skip to content

Commit

Permalink
chore: adjust publish script for playroom deployment
Browse files Browse the repository at this point in the history
Avoid building and deploying on dry-run
Get correct version tag for URL construction
  • Loading branch information
DSil committed Jan 30, 2025
1 parent 90fccc7 commit 6be9f86
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,17 +74,19 @@ jobs:
yarn zx scripts/post-changelog.mjs
- name: Build Playroom
if: ${{ github.event.inputs.dryrun == 'false' }}
run: yarn components build:playroom

- name: Build Storybook
if: ${{ github.event.inputs.dryrun == 'false' }}
run: yarn components build:storybook

- name: Get tag version
if: ${{ github.event.inputs.dryrun == 'false' }}
run: |
git fetch --tags --quiet
echo "VERSION_TAG=$(git tag --list '@kiwicom/orbit-components@*' --sort=creatordate | sed '$!d' | sed -n '$ s|.*@||; s/\./-/gp')" >> $GITHUB_ENV
- name: Get Storybook domain
run: |
echo "DOMAIN=https://kiwicom-orbit-v${VERSION_TAG}.surge.sh" >> $GITHUB_ENV
yarn components deploy:surge ${DOMAIN} --token ${{ secrets.SURGE_TOKEN }}
- name: Publish Storybook and Playroom
if: ${{ github.event.inputs.dryrun == 'false' }}
run: yarn components deploy:surge https://kiwicom-orbit-v${VERSION_TAG}.surge.sh --token ${{ secrets.SURGE_TOKEN }}

0 comments on commit 6be9f86

Please sign in to comment.