forked from wilsoniovlabs/relaying-services-sdk-dapp
-
Notifications
You must be signed in to change notification settings - Fork 5
42 lines (33 loc) · 1011 Bytes
/
deploy-qa.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: QA CD
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
environment: QA
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.QA_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.QA_AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.QA_AWS_REGION }}
- name: Setup Node 16
uses: actions/setup-node@v1
with:
node-version: '16'
- name: Install dependencies
run: |
npm ci --force # FIXME: PP-648
- name: Build site
run: |
npm run build:qa
- name: Deploy site to S3
run: |
aws s3 sync --delete --only-show-errors build/ ${{ secrets.QA_S3_BUCKET }}
- name: Invalidate CloudFront cache
run: |
aws cloudfront create-invalidation --distribution-id ${{ secrets.QA_CLOUDFRONT_DISTRIBUTION }} --paths "/*"