-
Notifications
You must be signed in to change notification settings - Fork 12
65 lines (57 loc) · 1.83 KB
/
ci-cd.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: ci-cd
on:
pull_request:
branches:
- master
- development
push:
branches:
- '*'
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up nodejs
uses: actions/setup-node@v2
with:
node-version: 'lts/*'
cache: 'npm'
- name: npm CI
run: npm ci
- name: npm Check
run: npm run check
- name: npm Test
run: npm run test
- name: npm Build
run: |
BUILD_BRANCH=$(echo "${GITHUB_REF#refs/heads/}")
echo $BUILD_BRANCH
BUILD_COMMIT=${{ github.sha }}
npm run build
- name: Deploy S3 Development
if: ${{ github.event_name == 'push' && github.event.push.ref == 'refs/heads/AUT-1161' }}
uses: jakejarvis/[email protected]
with:
args: --acl public-read --follow-symlinks --cache-control max-age=31536000,public
env:
AWS_S3_BUCKET: 'aws-development-split-public'
AWS_ACCESS_KEY_ID: ${{ secrets.NEW_STAGE_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.NEW_STAGE_AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'us-east-1'
SOURCE_DIR: './lib-umd'
DEST_DIR: sdk
- name: Deploy S3 Master
if: github.event_name == 'push' && github.event.pull_request.head.ref == 'master'
uses: jakejarvis/[email protected]
with:
args: --acl public-read --follow-symlinks --cache-control max-age=31536000,public
env:
AWS_S3_BUCKET: 'split-public'
AWS_ACCESS_KEY_ID: ${{ secrets.PUBLIC_ASSETS_PROD_USER }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.PUBLIC_ASSETS_PROD_KEY }}
AWS_REGION: 'us-east-1'
SOURCE_DIR: './lib-umd'
DEST_DIR: sdk