Bump markdown-to-jsx from 7.1.7 to 7.5.0 in /react #674
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 16 | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v4 | |
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@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 16 | |
- name: Get yarn cache path | |
id: yarn-cache-path | |
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v4 | |
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 }} |