Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Chore: update the deployment action #222

Merged
merged 2 commits into from
Feb 15, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 10 additions & 26 deletions .github/workflows/deploy-storybook.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
name: Deploy storybook

on:
# Disabled until environment is set up again
# Pull request hook without any config. Launches for every pull request
#pull_request:
# Launches build when release is published
#release:
# types: [published]
pull_request:
release:
types: [published]

env:
REPO_NAME_ALPHANUMERIC: safereactcomponents
Expand All @@ -21,31 +18,18 @@ jobs:
uses: styfle/cancel-workflow-action@0.9.1
with:
access_token: ${{ github.token }}

- uses: actions/checkout@v3

- name: Node.js setup
uses: actions/setup-node@v3
with:
node-version: 16

- uses: actions/cache@v2
- name: Yarn cache
uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}

- name: Env dependencies setup
run: |
sudo apt-get update
sudo apt-get -y install python3-pip python3-dev
pip install awscli --upgrade --user
key: web-core-modules-${{ hashFiles('**/yarn.lock') }}

- name: Yarn install
run: |
mkdir .yarncache
yarn install --cache-folder ./.yarncache --frozen-lockfile
rm -rf .yarncache
yarn cache clean
shell: bash
run: yarn install --immutable

- name: Build storybook
run: yarn build-storybook
Expand Down Expand Up @@ -75,7 +59,7 @@ jobs:
repo-token-user-login: 'github-actions[bot]'
if: success() && github.event.number
env:
REVIEW_FEATURE_URL: https://pr${{ github.event.number }}--safereactcomponents.review.gnosisdev.com
REVIEW_FEATURE_URL: https://pr${{ github.event.number }}--review-react-hr.5afe.dev

# Script to upload release files
- name: 'Upload release build files for production'
Expand Down
2 changes: 1 addition & 1 deletion scripts/github/deploy_pull_request.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
BUILD_DIR='storybook-static'

function deploy_pull_request {
REVIEW_ENVIRONMENT_DOMAIN='review.gnosisdev.com'
REVIEW_ENVIRONMENT_DOMAIN='review-react-hr.5afe.dev'

# Pull request name with "pr" prefix
PULL_REQUEST_NAME="pr$PR_NUMBER"
Expand Down