-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (39 loc) · 1.11 KB
/
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
name: Release
on:
workflow_dispatch:
inputs:
tags:
description: "Version tags"
push:
branches: [main]
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: pack for Station (@Silicon Valley)
run: |
cp -r . ../dist
rm -rf ../dist/.git
rm -rf ../dist/logs
rm -rf ../dist/db/.session
cp online.env ../dist/.env
tar cvfz bug-check.tar.gz -C ../dist/ .
- name: Push to Earth (@Beijing)
uses: nogsantos/scp-deploy@master
with:
src: bug-check.tar.gz
host: 139.199.30.36
remote: /root/
port: 22
user: root
key: ${{ secrets.SSH_KEY }}
- name: Distribution
uses: appleboy/ssh-action@master
with:
host: 139.199.30.36
port: 22
username: root
key: ${{ secrets.SSH_KEY }}
script: rm -rf /data/bug-check && mkdir -p /data/bug-check/logs && cd /data/bug-check && tar xvfz /root/bug-check.tar.gz && supervisorctl reload