Skip to content

Bump @babel/traverse from 7.17.3 to 7.23.2 in /react (#360) #636

Bump @babel/traverse from 7.17.3 to 7.23.2 in /react (#360)

Bump @babel/traverse from 7.17.3 to 7.23.2 in /react (#360) #636

Workflow file for this run

name: "Build react app and deploy to staging"
on:
push:
branches:
- develop
paths:
- .github/workflows/react.yml
- react/**/*
pull_request:
branches:
- develop
paths:
- .github/workflows/react.yml
- react/**/*
jobs:
build-react:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
working-directory: react
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: install dependencies
run: yarn install
- name: run eslint
run: |
yarn lint
- name: run prettier
run: |
yarn check-format
- name: compile typescript
run: |
yarn tsc
deploy:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
working-directory: react
needs: build-react
environment: SSMP_BUILD
concurrency: SSMP_BUILD
if: github.ref == 'refs/heads/develop'
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
- name: Get yarn cache path
id: yarn-cache-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: restore
with:
path: |
${{ steps.yarn-cache-path.outputs.dir }}
react/node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('react/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn install # should never happen due to build job
if: steps.restore.outputs.cache-hit != 'true'
# End setup
- run: yarn build
env:
REACT_APP_GRAPHQL_URL: ${{ secrets.REACT_APP_GRAPHQL_URL }}
REACT_APP_KEYCLOAK_AUTH_URL: ${{ secrets.REACT_APP_KEYCLOAK_AUTH_URL }}
REACT_APP_KEYCLOAK_REALM: ${{ secrets.REACT_APP_KEYCLOAK_REALM }}
REACT_APP_KEYCLOAK_CLIENT_ID: ${{ secrets.REACT_APP_KEYCLOAK_CLIENT_ID }}
REACT_APP_SOURCE_LIST: ${{ secrets.REACT_APP_SOURCE_LIST }}
- name: Upload to Minio bucket
# Uncomment during actual deploy to dev server
if: github.event_name == 'push'
env:
MC_HOST_minio: ${{ secrets.MC_HOST }}
run: |
sudo curl --output /usr/local/bin/mc https://dl.min.io/client/mc/release/linux-amd64/mc
sudo chmod +x /usr/local/bin/mc
./deploy.sh minio ${{ secrets.MINIO_BUCKET }}