Skip to content

fix: add new support resources (#861) #166

fix: add new support resources (#861)

fix: add new support resources (#861) #166

name: Deploy to Staging
on:
push:
branches: [master]
jobs:
deploy:
runs-on: ubuntu-latest
environment:
name: staging
url: https://ads.bravesoftware.com
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18.12.0
cache: npm
- name: Install dependencies
run: npm ci
- name: Build
env:
REACT_APP_SERVER_ADDRESS: ${{ secrets.REACT_STAGING_APP_SERVER_ADDRESS }}
# setting CI to false is temporary, while we still have lint errors
CI: false
run: npm run build
- run: npm run check:audit
- run: npm test
- 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: |
aws s3 sync build/ s3://ads-ui-staging/ --delete
aws cloudfront create-invalidation --distribution-id $CLOUDFRONT_DISTRIBUTION_ID --paths "/*"