-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (47 loc) · 1.47 KB
/
deploy-release.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
name: Deploy Release
on:
release:
types:
- released
env:
ARTIFACTS_REPOSITORY: hubofallthings-net-frontend-build-artifacts
jobs:
build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup SSH
uses: webfactory/ssh-agent@v0.5.3
with:
ssh-private-key: ${{ secrets.SSH_HMI_LIBRARY }}
- name: Setup NODEJS
uses: actions/setup-node@v2.4.1
with:
node-version: 12
registry-url: https://npm.pkg.github.com
- name: Cache
uses: actions/cache@v2.1.6
with:
path: '**/node_modules'
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- name: Install
run: yarn install --network-concurrency 1
env:
NODE_AUTH_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
# TODO: ADD ENVIRONMENT UNIFICATION
- name: Build deployment package
run: PUBLIC_URL=/assets yarn build
env:
CI: true
- name: Upload the build
env:
AWS_ACCESS_KEY_ID: ${{ secrets.DEPLOYER_MASTER_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.DEPLOYER_MASTER_SECRET_ACCESS_KEY }}
run: |
aws s3 sync build/ s3://$ARTIFACTS_REPOSITORY/$(echo $GITHUB_REF | sed -e "s/refs\/tags\///g")/ \
--region eu-west-1
aws s3 sync build/ s3://$ARTIFACTS_REPOSITORY/latest/ \
--region eu-west-1