-
Notifications
You must be signed in to change notification settings - Fork 8
40 lines (38 loc) · 1.1 KB
/
main.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
name: release
on:
push:
branches: main
jobs:
build:
runs-on: ubuntu-latest # 运行环境
steps:
- name: checkout
uses: actions/checkout@master
- name: nodejs installation
uses: actions/setup-node@v2
with:
node-version: "18"
- name: npm install
run: npm install
working-directory: './' # working-directory 指定 shell 命令运行目录
- name: npm run build
run: npm run build
working-directory: './'
- name: scp
uses: appleboy/scp-action@master
with:
host: ${{ secrets.HOSTCOLO }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORDCOLO }}
source: 'build/*'
target: '/www/wwwroot/astrbot.soulter.top/'
- name: script
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOSTCOLO }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORDCOLO }}
script: |
cd /www/wwwroot/astrbot.soulter.top/
rm -rf center
mv build/ center/