File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed
Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy to S3 and invalidate CloudFront
2+ on :
3+ push :
4+ branches : [main]
5+
6+ jobs :
7+ deploy :
8+ runs-on : ubuntu-latest
9+ steps :
10+ - uses : actions/checkout@v2
11+
12+ - name : Setup Node
13+ uses : actions/setup-node@v2
14+ with :
15+ node-version : " 18"
16+
17+ - name : Install dependencies
18+ run : npm ci
19+
20+ - name : Build
21+ run : npm run build
22+ env :
23+ VITE_API_SERVER_URL : ${{ secrets.VITE_API_SERVER_URL }}
24+
25+ - name : Configure AWS credentials
26+ uses : aws-actions/configure-aws-credentials@v1
27+ with :
28+ aws-access-key-id : ${{ secrets.AWS_ACCESS_KEY_ID }}
29+ aws-secret-access-key : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
30+ aws-region : ap-northeast-2
31+
32+ - name : Deploy to S3
33+ run : aws s3 sync dist/ s3://solid-connection-admin --delete
34+
35+ - name : Invalidate CloudFront
36+ run : |
37+ aws cloudfront create-invalidation --distribution-id ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }} --paths "/*"
You can’t perform that action at this time.
0 commit comments