-
Notifications
You must be signed in to change notification settings - Fork 4
60 lines (56 loc) · 1.43 KB
/
update_webui.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
name: Update Arona Webui
on:
push:
branches:
- master
paths:
- "arona-webui/**"
workflow_dispatch:
concurrency:
group: "deploy_webui"
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@main
with:
fetch-depth: 0
# Set up Node.js environment
- uses: actions/setup-node@main
with:
node-version: '18.x'
- uses: pnpm/action-setup@master
with:
version: v8.15.7
- name: Build
run: |
cd arona-webui
pnpm i
pnpm run build
- name: Compress dist directory
uses: thedoctor0/zip-release@main
with:
directory: 'arona-webui'
type: '7z'
filename: 'dist.7z'
path: 'dist'
exclusions: '*.git* /*node_modules/* .editorconfig'
- name: Docs rsync deploy
uses: easingthemes/ssh-deploy@main
with:
SSH_PRIVATE_KEY: ${{ secrets.SERVER_KEY }}
SOURCE: "arona-webui/dist.7z"
REMOTE_HOST: ${{ secrets.SERVER_HOST }}
REMOTE_USER: ${{ secrets.SERVER_USERNAME }}
TARGET: "/srv/kivotos/tmp/dist.7z"
- name: Run script on server
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USERNAME }}
key: ${{ secrets.SERVER_KEY }}
script: |
cd /srv/kivotos
bash run2.sh