-
Notifications
You must be signed in to change notification settings - Fork 138
70 lines (58 loc) · 1.73 KB
/
deploy-ui.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
66
67
68
69
70
name: Deploy UI
on:
release:
types: [ published ]
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-20.04
steps:
- name: Cloning Source Repo
uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Setting up directories
run: mkdir -p app/lib
- name: Cloning Library Repo
uses: actions/checkout@v2
with:
repository: 'vpj/weya'
submodules: 'recursive'
path: 'app/lib/weya'
ref: 'jsdom'
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Setup Cache
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install SSH key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_KEY }}
name: id_rsa
known_hosts: ${{ secrets.KNOWN_HOSTS }}
- name: Prepare build environment
run: |
cd app/ui && npm install
echo "${{ secrets.ENV_TS }}" > src/env.ts
- name: Build
run: cd app && make compile-prod
- name: Deploy
run: |
rsync -zravKLt --perms --executability app/static/ ${{ secrets.DEPLOY_LOCATION }}
- name: Create Sentry release
uses: getsentry/action-release@v1
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
with:
environment: production
sourcemaps: './app/static/js'
set_commits: skip