-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (53 loc) · 1.43 KB
/
ci.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
name: Build UI
on:
push:
branches: [main]
pull_request:
types: [opened,synchronize,reopened]
workflow_dispatch: {}
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- name: Install dependencies
run: yarn install
- name: Check with lint
run: yarn lint
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- name: Install dependencies
run: yarn install
- name: Build
run: yarn build
- name: Archive build artifacts
uses: actions/upload-artifact@v2
with:
name: build
path: dist/
deploy:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
needs:
- lint
- build
steps:
- name: Download build artifacts
uses: actions/download-artifact@v2
with:
name: build
path: dist/
- name: Upload to Server
uses: up9cloud/action-rsync@master
env:
USER: ${{secrets.DEPLOY_SSH_USER}}
HOST: ${{secrets.DEPLOY_SSH_HOST}}
KEY: ${{secrets.DEPLOY_SSH_KEY}}
ARGS: -rzh -O --delete-after --exclude=rtmp/ --exclude=stream/ --exclude=videos/
SSH_ARGS: '-p ${{secrets.DEPLOY_SSH_PORT}} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'
SOURCE: dist/
TARGET: /