-
Notifications
You must be signed in to change notification settings - Fork 5
38 lines (29 loc) · 970 Bytes
/
ci-main.yml
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
name: CI-main
on:
push:
branches: main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
run: npm install
- run: |
npm run build --if-present
- name: Configure AWS Credential
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_DEFAULT_REGION }}
- name: Deploy page to bucket
run: aws s3 sync ./build s3://${{ secrets.AWS_BUCKET }}
# - name: Invalidate dashboard cloudfront
# run: aws cloudfront create-invalidation --distribution-id ${{ secrets.DIST_ID }} --paths "/*"