From 6be9f8622e07473da080dcede4ad26ecc193d9c0 Mon Sep 17 00:00:00 2001 From: Daniel Sil Date: Thu, 30 Jan 2025 12:54:28 +0100 Subject: [PATCH] chore: adjust publish script for playroom deployment Avoid building and deploying on dry-run Get correct version tag for URL construction --- .github/workflows/publish.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 714ba376b4..20db85f08a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -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 }}