-
Notifications
You must be signed in to change notification settings - Fork 5
40 lines (36 loc) · 1023 Bytes
/
build.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
name: CI
on:
push:
branches:
- master
permissions:
id-token: write
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: '12.x'
- name: Build
run: |
if [ -e yarn.lock ]; then
yarn install --frozen-lockfile
elif [ -e package-lock.json ]; then
npm ci
else
npm i
fi
npm run build
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: arn:aws:iam::299695708834:role/DevelopersDeployRole
role-session-name: GHActionsOIDCRole-actions
aws-region: us-east-1
- name: S3 sync
run: |
aws s3 sync --delete --acl public-read ./build s3://developers.inplayer.com/
aws cloudfront create-invalidation --distribution-id ${{ secrets.DISTRIBUTION_ID }} --paths "/*"