Skip to content

Commit 04635ca

Browse files
committed
chore: add deploy action
1 parent a191f45 commit 04635ca

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Deploy Chii
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
deploy:
8+
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v4
13+
with:
14+
path: project/chii
15+
- uses: actions/setup-node@v4
16+
with:
17+
node-version: '18.x'
18+
- working-directory: ./project
19+
run: |
20+
sudo apt-get install git curl xz-utils python3-pkg-resources python3-virtualenv python3-oauth2client
21+
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
22+
echo "PATH=$(pwd)/depot_tools:$PATH" >> $GITHUB_ENV
23+
- working-directory: ./project/chii
24+
run: |
25+
npm install -g @liriliri/lsla
26+
npm i
27+
npm run init:front_end
28+
npm run build
29+
mkdir -p ../../project/chii
30+
cp -r bin public server test package.json ../../project/chii
31+
- uses: appleboy/scp-action@master
32+
with:
33+
host: ${{ secrets.HOST }}
34+
username: ${{ secrets.USERNAME }}
35+
password: ${{ secrets.PASSWORD }}
36+
source: "project/chii/"
37+
target: "/root/"
38+

0 commit comments

Comments
 (0)