Merge pull request #122 from MrBmikhael/snyk-upgrade-6a7684977cbe0b7f… #172
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-and-Deploy | |
on: | |
push: | |
branches: [ master ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '18' | |
- name: Setup Yarn Env | |
run: yarn | |
- shell: bash | |
env: | |
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }} | |
GOOGLE_CLIENT_ID: ${{ secrets.GOOGLE_CLIENT_ID }} | |
run: | | |
echo "REACT_APP_GOOGLE_API_KEY=\"$GOOGLE_API_KEY\"" > .env | |
echo "REACT_APP_GOOGLE_CLIENT_ID=\"$GOOGLE_CLIENT_ID\"" >> .env | |
- name: Build app | |
run: yarn build | |
- name: Unit Test | |
run: yarn test:ci | |
- name: Deploy | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
branch: gh-pages | |
folder: build | |