-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (42 loc) · 1.2 KB
/
config.yml
File metadata and controls
52 lines (42 loc) · 1.2 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
51
52
name: Build and Deploy
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
# https://github.com/marketplace/actions/setup-node-js-for-use-with-actions
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '12.x'
- run: npm install
- run: npm run build
- name: upload build artifacts
uses: actions/upload-artifact@v1
with:
name: build
path: build
publish:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Download build artifacts
uses: actions/download-artifact@v1
with:
name: build
# https://github.com/opspresso/action-s3-sync
- name: Publish to AWS S3
uses: opspresso/action-s3-sync@master
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'us-west-2'
FROM_PATH: './build'
DEST_PATH: 's3://<% .Name %>'
OPTIONS: '--acl public-read'