Skip to content

lock

lock #22

Workflow file for this run

name: Release
on:
push:
branches:
- master
defaults:
run:
working-directory: ./toga-dashboard
jobs:
build:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }}
NODE_ENV: production
CI: false # Don't treat warnings as errors.
steps:
- uses: actions/checkout@v2
- name: Show GitHub contexts
run: |
echo github.event_name: ${{ github.event_name }}
echo github.repository: ${{ github.repository }}
echo github.ref: ${{ github.ref }}
echo github.head_ref: ${{ github.head_ref }}
echo github.base_ref: ${{ github.base_ref }}
- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 16.x
- name: Install & Build
run: |
yarn install --frozen-lockfile --production=false
yarn build
# NOTE: `--production=false` is because of devDependencies. `yarn` doesn't install them when in production mode.
env:
REACT_APP_WALLET_CONNECT_PROJECT_ID: ${{ secrets.WALLET_CONNECT_PROJECT_ID }}
- name: Archive build
uses: actions/upload-artifact@v2
with:
name: build
path: ./toga-dashboard/build
retention-days: 1
deploy:
needs: [ build ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2
with:
repository: superfluid-finance/build-scripts
path: build-scripts
- name: Download build
uses: actions/download-artifact@v2
with:
name: build
path: build
- name: Deploy
uses: ./build-scripts/s3cloudfront-hosting/actions/sync
with:
local_build_dir: build
aws_region: eu-west-2
aws_access_key_id: ${{ secrets.SITE_DEPLOYER_AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.SITE_DEPLOYER_AWS_SECRET_ACCESS_KEY }}
s3_uri: s3://site-toga.superfluid.finance
cloudfront_distribution_id: E1YX81YU7552SJ