From 5082c99faaf7ee9d96ccc9a95b3b56982212ceca Mon Sep 17 00:00:00 2001 From: Sarka Chwastkova Date: Wed, 15 Jan 2025 16:47:02 +0100 Subject: [PATCH] chore: add Playroom deployment --- .github/workflows/playroom.yml | 47 ++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/playroom.yml diff --git a/.github/workflows/playroom.yml b/.github/workflows/playroom.yml new file mode 100644 index 0000000000..f8a71e50b5 --- /dev/null +++ b/.github/workflows/playroom.yml @@ -0,0 +1,47 @@ +name: Playroom + +on: + push: + branches: + - master + pull_request: + branches: + - "**" + +env: # Set environment variables for every job and step in this workflow + CLICOLOR: "1" # Enable colors for *NIX commands + PY_COLORS: "1" # Enable colors for Python-based utilities + FORCE_COLOR: "1" # Force colors in the terminal + +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: Version test + run: | + git fetch --tags + echo "D2=$(git tag --list '@kiwicom/orbit-components@*' --sort=creatordate | sed '$!d')" >> $GITHUB_ENV + echo "D3=$(git tag --list '@kiwicom/orbit-components@*' --sort=creatordate | sed '$!d' | sed -n 's|.*@||p')" >> $GITHUB_ENV + echo "D4=$(git tag --list '@kiwicom/orbit-components@*' --sort=creatordate | sed '$!d' | sed -n 's|.*@||p' | sed 's/\./-/g')" >> $GITHUB_ENV + echo "VERSION_TAG=$(git tag --list '@kiwicom/orbit-components@*' --sort=creatordate | sed '$!d' | sed -n 's|.*@||p' | sed 's/\./-/g')" >> $GITHUB_ENV + echo $VERSION_TAG + + - name: Get DOMAIN + # if: ${{ github.event.inputs.dryrun == 'false' }} + # run: echo "PLAYROOM_DOMAIN=https://kiwicom-orbit-v${VERSION_TAG}.surge.sh" >> $GITHUB_ENV + run: | + echo $VERSION_TAG + echo "PLAYROOM_DOMAIN=https://kiwicom-orbit-v${VERSION_TAG}.surge.sh" >> $GITHUB_ENV + + - name: Deploy to staging + run: echo $PLAYROOM_DOMAIN + # run: yarn components deploy:surge ${PLAYROOM_DOMAIN} --token ${{ secrets.SURGE_TOKEN }}