File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Deploy to S3
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+
8+ jobs :
9+ deploy :
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - name : Checkout repository
14+ uses : actions/checkout@v3
15+
16+ - name : Set up Node.js
17+ uses : actions/setup-node@v3
18+ with :
19+ node-version : 18
20+
21+ - name : Install dependencies
22+ run : npm ci
23+
24+ - name : Build app
25+ run : npm run build
26+
27+ - name : Deploy to S3
28+ uses : jakejarvis/s3-sync-action@master
29+ with :
30+ args : --delete
31+ env :
32+ AWS_S3_BUCKET : ${{ secrets.AWS_S3_BUCKET }}
33+ AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
34+ AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
35+ AWS_REGION : ${{ secrets.AWS_REGION }}
36+ SOURCE_DIR : ./dist
37+
38+ - name : Invalidate CloudFront cache
39+ uses : chetan/invalidate-cloudfront-action@v2
40+ env :
41+ AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
42+ AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
43+ DISTRIBUTION : ${{ secrets.AWS_CLOUDFRONT_DISTRIBUTION_ID }}
44+ PATHS : ' /*'
Original file line number Diff line number Diff line change 1- import { defineConfig } from 'vite'
2- import react from '@vitejs/plugin-react'
1+ import { defineConfig } from 'vite' ;
2+ import react from '@vitejs/plugin-react' ;
33
44// https://vite.dev/config/
55export default defineConfig ( {
6+ base : '/' ,
67 plugins : [ react ( ) ] ,
7- } )
8+ } ) ;
You can’t perform that action at this time.
0 commit comments