Skip to content

chore: add Playroom deployment #20

chore: add Playroom deployment

chore: add Playroom deployment #20

Workflow file for this run

name: Playroom
on:
pull_request:
branches:
- "**"
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
pull-requests: write # for dependabot
contents: write # for deploying to GitHub Pages on master
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Node
uses: ./.github/actions/node
- name: Compile design tokens
run: yarn tokens build
- name: Build tailwind
run: yarn tailwind-preset build
- name: Build Orbit components
run: yarn components build
- name: Build Playroom
run: yarn components build:playroom
- name: Build Storybook
run: yarn components build:storybook
# Get the number of the latest tag
- name: Version test
if: github.ref != 'refs/heads/master'
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
# Create an URL for the Playroom
- name: Get DOMAIN
if: github.ref != 'refs/heads/master'
run: echo "DOMAIN=https://kiwicom-orbit-v${VERSION_TAG}.surge.sh" >> $GITHUB_ENV
- name: Deploy to staging
if: github.ref != 'refs/heads/master'
run: |
echo $DOMAIN
yarn components deploy:surge ${DOMAIN} --token ${{ secrets.SURGE_TOKEN }}