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

fix: remove Alert border #193

fix: remove Alert border

fix: remove Alert border #193

name: Deploy storybook
on:
pull_request:
release:
types: [published]
env:
REPO_NAME_ALPHANUMERIC: safereactcomponents
jobs:
deploy:
name: Deployment
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v3
- name: Yarn cache
uses: actions/cache@v3
with:
path: '**/node_modules'
key: web-core-modules-${{ hashFiles('**/yarn.lock') }}
- name: Yarn install
shell: bash
run: yarn install --immutable
- name: Build storybook
run: yarn build-storybook
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_DEFAULT_REGION }}
# Script to deploy Pull Requests
- run: bash ./scripts/github/deploy_pull_request.sh
if: success() && github.event.number
env:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
PR_NUMBER: ${{ github.event.number }}
REVIEW_BUCKET_NAME: ${{ secrets.AWS_REVIEW_BUCKET_NAME }}
- name: 'PRaul: Comment PR with app URLs'
uses: mshick/add-pr-comment@v1
with:
message: |
:books: [Storybook review](${{ env.REVIEW_FEATURE_URL }})
repo-token: ${{ secrets.GITHUB_TOKEN }}
repo-token-user-login: 'github-actions[bot]'
if: success() && github.event.number
env:
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'
if: startsWith(github.ref, 'refs/tags/v')
run: aws s3 sync storybook-static s3://${{ secrets.STAGING_BUCKET_NAME }}/releases/${{ github.event.release.tag_name }}/website --delete
# Script to prepare production deployments
- run: bash ./scripts/github/prepare_production_deployment.sh
if: success() && startsWith(github.ref, 'refs/tags/v')
env:
PROD_DEPLOYMENT_HOOK_TOKEN: ${{ secrets.PROD_DEPLOYMENT_HOOK_TOKEN }}
PROD_DEPLOYMENT_HOOK_URL: ${{ secrets.PROD_DEPLOYMENT_HOOK_URL }}
VERSION_TAG: ${{ github.event.release.tag_name }}