Skip to content

Release - Staging

Release - Staging #100

name: Release - Staging
on:
workflow_dispatch:
inputs:
jobs:
build:
runs-on: ubuntu-latest
environment:
name: staging
url: https://app.v2.staging.jediswap.xyz/
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'
- name: Install dependencies
run: yarn install --immutable
- name: Build Project
run: yarn build
env:
CI: false
RELEASE_TYPE: 'STAGING'
- name: Configure AWS
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Deploy app build to S3 bucket
run: aws s3 sync ./build/ s3://$BUCKET_NAME
env:
BUCKET_NAME: ${{ secrets.AWS_S3_BUCKET_NAME }}
- name: Run Cache Invalidation
run: aws cloudfront create-invalidation --distribution-id $CDN_DISTRIBUTION_ID --paths /\*
env:
CDN_DISTRIBUTION_ID: ${{ secrets.AWS_CDN_DISTRIBUTION_ID }}