diff --git a/.github/workflows/deploy-storybook.yml b/.github/workflows/deploy-storybook.yml index 80e7e5e8..ed7fb252 100644 --- a/.github/workflows/deploy-storybook.yml +++ b/.github/workflows/deploy-storybook.yml @@ -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 @@ -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 @@ -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 }}--${{ env.REPO_NAME_ALPHANUMERIC }}.review-react-hr.5afe.dev # Script to upload release files - name: 'Upload release build files for production' diff --git a/scripts/github/deploy_pull_request.sh b/scripts/github/deploy_pull_request.sh index c25f8114..7cbaa55c 100644 --- a/scripts/github/deploy_pull_request.sh +++ b/scripts/github/deploy_pull_request.sh @@ -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"