-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (37 loc) · 1.29 KB
/
upload-to-s3.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
name: CI
on:
push:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: fetch source code
uses: actions/[email protected]
- name: node cache
uses: actions/[email protected]
env:
cache-name: modules-node
with:
path: node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: install dependencies
run: yarn install --frozen-lockfile
- name: build
run: |
yarn build
mv build extension-chrome-facet-ninja && sudo apt install zip && zip -r extension-chrome-facet-ninja.zip ./extension-chrome-facet-ninja/ && mkdir tmp-build && mv extension-chrome-facet-ninja.zip tmp-build/ && ls -d $PWD/*
env:
CI: false
- name: deploy
uses: docker://amazon/aws-cli:2.1.18
with:
args: s3 sync ./tmp-build s3://cdn.facet.ninja/ --delete --follow-symlinks
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: "us-west-2"