Skip to content

Commit

Permalink
chore: add Playroom deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
sarkaaa authored and DSil committed Jan 16, 2025
1 parent a961646 commit e32c02b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
12 changes: 12 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ jobs:
yarn tokens build
yarn tailwind-preset build
yarn components build
yarn components build:playroom
yarn components build:storybook
- name: Dry run
if: ${{ github.event.inputs.dryrun == 'true' }}
Expand Down Expand Up @@ -72,3 +74,13 @@ jobs:
yarn docs changelog
git add docs/src/data/log.md && git commit -m "docs: update changelog" && git push
yarn zx scripts/post-changelog.mjs
- name: Get tag version
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 }}
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ jobs:
if: github.ref != 'refs/heads/master'
run: echo "DOMAIN=https://kiwicom-orbit-${BRANCH_URL}.surge.sh" >> $GITHUB_ENV

- name: Get Playroom DOMAIN
if: github.ref != 'refs/heads/master'
run: echo "DOMAIN_PLAYROOM=${DOMAIN}/playroom" >> $GITHUB_ENV

- name: Deploy to staging
if: github.ref != 'refs/heads/master'
run: yarn components deploy:surge ${DOMAIN} --token ${{ secrets.SURGE_TOKEN }}
Expand All @@ -61,7 +65,7 @@ jobs:
uses: actions/github-script@v6
with:
script: |
const commentBody = `Storybook staging is available at ${process.env.DOMAIN}`;
const commentBody = `Storybook staging is available at ${process.env.DOMAIN}\n Playroom staging is available at ${process.env.DOMAIN_PLAYROOM}`;
const commentsList = await github.rest.issues.listComments({
issue_number: context.issue.number,
Expand Down

0 comments on commit e32c02b

Please sign in to comment.