Skip to content
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: CD (ENV:TEST) push_to_deploy-test into AWS S3 simple-toshi-ui-test
on:
push:
branches: [ deploy-test ]
jobs:
build:
runs-on: ubuntu-latest
environment: AWS_TEST
env:
REACT_APP_GRAPH_ENDPOINT: ${{ secrets.REACT_APP_GRAPH_ENDPOINT_TEST }}
REACT_APP_GRAPH_API_KEY: ${{ secrets.REACT_APP_GRAPH_API_KEY_TEST }}
REACT_APP_REPORTS_URL: ${{ secrets.REACT_APP_REPORTS_URL_TEST }}
REACT_APP_REPORTS_LIMIT: ${{ secrets.REACT_APP_REPORTS_LIMIT_TEST }}
REACT_APP_ROOT_PATH: ${{ secrets.REACT_APP_ROOT_PATH_TEST }}
REACT_APP_MIN_X_BOUND: ${{secrets.REACT_APP_MIN_X_BOUND_TEST }}
#The following are set up in AWS_TEST deployment environ
REACT_APP_SOLVIS_ENDPOINT: ${{ secrets.REACT_APP_SOLVIS_ENDPOINT }}
REACT_APP_SOLVIS_API_KEY: ${{ secrets.REACT_APP_SOLVIS_API_KEY }}
REACT_APP_ANALYSIS_LOC_LIST_ID: ${{ secrets.REACT_APP_ANALYSIS_LOC_LIST_ID }}
REACT_APP_RADII_ID: ${{ secrets.REACT_APP_RADII_ID }}
strategy:
matrix:
node-version: [16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: yarn install --frozen-lockfile
- run: yarn build
- run: yarn test
- name: Deploy to S3
uses: GNS-Science/s3-sync-action@master
with:
args: --acl public-read --delete
env:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET_TEST }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_S3_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_S3_SECRET }}
AWS_REGION: ${{ secrets.AWS_S3_REGION }}
SOURCE_DIR: "build"