18
18
deploy :
19
19
name : Deployment
20
20
runs-on : ubuntu-latest
21
- defaults :
22
- run :
23
- working-directory : ./website
24
21
25
22
steps :
26
23
- name : Cancel Previous Runs
46
43
uses : actions/setup-node@v2
47
44
48
45
- name : Install
46
+ working-directory : ./website
49
47
run : |
50
48
rm -rf .cache
51
49
rm -rf build
54
52
pip install awscli --upgrade --user
55
53
56
54
- name : Build App
55
+ working-directory : ./website
57
56
run : yarn build
58
57
59
58
- name : Configure AWS Development credentials
@@ -74,20 +73,23 @@ jobs:
74
73
75
74
# Script to deploy to development environment
76
75
- name : ' Deploy to S3: Development'
76
+ working-directory : ./website
77
77
if : github.ref == 'refs/heads/dev'
78
78
run : |
79
79
aws s3 sync build/ s3://${{ secrets.DEV_BUCKET_NAME }}/dev --exclude "*.html" --cache-control max-age=0,no-cache,no-store,public
80
80
aws s3 sync build/ s3://${{ secrets.DEV_BUCKET_NAME }}/dev --exclude "*" --include "*.html" --cache-control max-age=0,no-cache,no-store,must-revalidate --content-type text/html
81
81
82
82
# Script to deploy to staging environment
83
83
- name : ' Deploy to S3: Staging'
84
+ working-directory : ./website
84
85
if : github.ref == 'refs/heads/main'
85
86
run : |
86
87
aws s3 sync build/ s3://${{ secrets.DEV_BUCKET_NAME }}/staging --exclude "*.html" --cache-control max-age=0,no-cache,no-store,public
87
88
aws s3 sync build/ s3://${{ secrets.DEV_BUCKET_NAME }}/staging --exclude "*" --include "*.html" --cache-control max-age=0,no-cache,no-store,must-revalidate --content-type text/html
88
89
89
90
# Script to deploy to release environment
90
91
- name : ' Deploy to S3: Release'
92
+ working-directory : ./website
91
93
if : github.ref == 'refs/heads/release'
92
94
run : |
93
95
aws s3 sync build/ s3://${{ secrets.RELEASE_BUCKET_NAME }} --delete --exclude "*.html" --exclude "sitemap.xml" --cache-control max-age=86400,public
0 commit comments