-
Notifications
You must be signed in to change notification settings - Fork 1
84 lines (65 loc) · 2 KB
/
test.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: Test
on:
push:
branches-ignore: [master]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node.js environment
uses: actions/[email protected]
with:
node-version: 20
- name: npm install dependencies
run: npm install
- name: run prettier
run: npm run prettier
- name: run tslint
run: npm run lint
- name: run tests
run: npm run test
build:
runs-on: ubuntu-latest
needs: test
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_KEY }}
BUGSNAG_KEY: ${{ secrets.BUGSNAG_KEY }}
ROOT_URL: https://next.polls.pizza
steps:
- uses: actions/checkout@v2
- name: Setup Node.js environment
uses: actions/[email protected]
with:
node-version: 20
- name: install dependencies
run: npm install
- name: build site
run: npm run build
env:
STRIPE_PUBLIC_KEY: ${{ secrets.STRIPE_PUBLIC_KEY_TEST }}
NODE_ENV: stage
PIZZA_BASE_DOMAIN: https://base-next.polls.pizza
BUGSNAG_KEY: ${{ secrets.BUGSNAG_KEY }}
- name: Deploy to staging
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks --delete
env:
AWS_S3_BUCKET: ${{ secrets.DEV_BUCKET }}
AWS_REGION: "us-west-2"
SOURCE_DIR: "dist/www"
- name: publish to bugsnag
run: npm run bugsnag
- name: Bugsnag Release
uses: psprings/[email protected]
with:
apiKey: ${{ secrets.BUGSNAG_KEY }}
releaseStage: stage
- name: Invalidate cache & wait for completion
uses: muratiger/invalidate-cloudfront-and-wait-for-completion-action@master
env:
AWS_REGION: "us-east-1"
DISTRIBUTION_ID: ${{ secrets.STAGE_DISTRIBUTION_ID }}
PATHS: "/*"