Skip to content

Commit 2a4f421

Browse files
Add GitHub Actions workflow for AWS S3 deployment
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 1ff8cf0 commit 2a4f421

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Deploy to AWS S3
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- name: Setup Node.js
15+
uses: actions/setup-node@v4
16+
with:
17+
node-version: '20'
18+
cache: 'npm'
19+
20+
- name: Install dependencies
21+
run: npm ci
22+
23+
- name: Build
24+
run: npm run build
25+
26+
- name: Deploy to S3
27+
uses: jakejarvis/s3-sync-action@master
28+
with:
29+
args: --follow-symlinks --delete
30+
env:
31+
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
32+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
33+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
34+
AWS_REGION: 'ca-central-1'
35+
SOURCE_DIR: 'dist'

0 commit comments

Comments
 (0)