-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (42 loc) · 1.13 KB
/
deploy.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: Deploy
on: [push]
jobs:
staging:
runs-on: ubuntu-latest
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: 'us-east-1'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.x
- run: npm ci
- run: npm test
- run: npm run build
- run: STAGE=staging npm run deploy
staging-cypress:
runs-on: ubuntu-22.04
needs: staging
steps:
- uses: actions/checkout@v4
- uses: cypress-io/github-action@v6
with:
working-directory: packages/cypress-tests
prod:
runs-on: ubuntu-latest
needs: staging-cypress
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: 'us-east-1'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.x
- run: npm ci
- run: npm test
- run: npm run build
- run: STAGE=prod npm run deploy