-
Notifications
You must be signed in to change notification settings - Fork 8
50 lines (46 loc) · 1.33 KB
/
admin-ci.yml
File metadata and controls
50 lines (46 loc) · 1.33 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
48
49
50
name: Admin CI
on:
push:
branches: ["main"]
paths:
- "app-admin/**"
pull_request:
branches: ["main"]
paths:
- "app-admin/**"
jobs:
build:
runs-on: ubuntu-22.04
defaults:
run:
working-directory: ./app-admin
permissions:
id-token: write
contents: write
steps:
- uses: actions/checkout@v3
- name: Setup node.js 16.17.1
uses: actions/setup-node@v3
with:
node-version: 16.17.1
cache: "npm"
cache-dependency-path: app-admin/package-lock.json
- name: Install dependecies
run: npm ci
- name: Build
run: npm run build
# - name: Test
# run: npm run test
# - name: Run lint
# run: npm run lint
- name: Configure AWS Credentials
if: github.ref == 'refs/heads/main'
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: ${{ secrets.AWS_ROLE }}
aws-region: ap-northeast-2
- name: Deploy
if: github.ref == 'refs/heads/main'
run: |
aws s3 cp dist s3://space-admin.codesoom.com --recursive --exclude index.html --acl public-read --region ap-northeast-2
aws s3 cp dist/index.html s3://space-admin.codesoom.com --cache-control max-age=0 --acl public-read --region ap-northeast-2