Skip to content

fix: add extra spacing at top of screen (#1213) #374

fix: add extra spacing at top of screen (#1213)

fix: add extra spacing at top of screen (#1213) #374

name: Deploy to Staging
on:
workflow_dispatch:
push:
branches: [master]
jobs:
deploy:
runs-on: ubuntu-latest
environment:
name: staging
url: https://ads.bravesoftware.com
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: Use Node.js
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version-file: ".node-version"
cache: npm
- name: Install dependencies
run: npm ci
- run: npm run check
- name: Build
env:
REACT_APP_SERVER_ADDRESS: ${{ secrets.REACT_STAGING_APP_SERVER_ADDRESS }}
REACT_APP_GIT_SHA1: ${{ github.sha }}
run: |
export REACT_APP_BUILD_TIME=$(date -Iseconds)
npm run build
- name: Deploy static files
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_STAGING_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_STAGING_SECRET_ACCESS_KEY }}
AWS_REGION: us-west-2
CLOUDFRONT_DISTRIBUTION_ID: ${{ secrets.CLOUDFRONT_STAGING_DISTRIBUTION_ID }}
run: |
cd build
aws s3 sync ./static/ "s3://ads-ui-staging/static/" --cache-control "max-age=31536000, public"
aws s3 sync . "s3://ads-ui-staging/" --exclude "static/*" --cache-control "max-age=60, public"
aws cloudfront create-invalidation --distribution-id $CLOUDFRONT_DISTRIBUTION_ID --paths "/*"