feat: add VAC reporting (#886) #187
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 | |
- 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 "/*" |