-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (39 loc) · 1.12 KB
/
ci-development.yml
File metadata and controls
47 lines (39 loc) · 1.12 KB
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
name: Deploy Development CI
on:
push:
branches: [develop]
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
CF_DISTRIBUTION_ID: ${{ secrets.AWS_CF_DEV_DISTRIBUTION_ID }}
VITE_API_URL: ${{ secrets.VITE_DEV_API_URL }}
VITE_NODE_ENV: development
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Build application
run: pnpm build
- name: Deploy to s3
run: |
aws s3 sync \
--delete \
--region ap-northeast-2 \
dist s3://dev.snackga.me
- name: Invalidate CloudFront Cache
run: |
aws cloudfront create-invalidation \
--distribution-id $CF_DISTRIBUTION_ID \
--paths "/*"