File tree 5 files changed +34
-7
lines changed
5 files changed +34
-7
lines changed Original file line number Diff line number Diff line change 1
- name : Pages
1
+ name : Deploy
2
2
3
3
on :
4
4
push :
8
8
branches :
9
9
- master # default branch
10
10
jobs :
11
- pages :
11
+ build :
12
12
runs-on : ubuntu-latest
13
13
permissions :
14
14
contents : write
34
34
cd ../
35
35
- name : Build
36
36
run : npm run build
37
+ - name : Setup SSH Private Key
38
+ env :
39
+ KEY : ${{ secrets.KEY }}
40
+ run : |
41
+ mkdir -p ~/.ssh/
42
+ echo "$KEY" > ~/.ssh/id_rsa
43
+ chmod 600 ~/.ssh/id_rsa
44
+ ssh-keyscan 20.115.186.5 >> ~/.ssh/known_hosts
37
45
- name : Deploy
38
- uses : peaceiris/actions-gh-pages@v3
39
- with :
40
- github_token : ${{ secrets.GITHUB_TOKEN }}
41
- publish_dir : ./website
46
+ run : |
47
+ cd ./deploy
48
+ chmod +x deploy.sh unzipServer.sh upload.sh
49
+ ./deploy.sh
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ ./upload.sh
4
+ ./unzipServer.sh
Original file line number Diff line number Diff line change
1
+
2
+ #! /usr/bin/expect
3
+
4
+ set timeout 10
5
+
6
+ expect " aosc@vmportal001:~$"
7
+ send " cd /home/aosc/web\r"
8
+ send " rm -rf website\r"
9
+ send " unzip -x website.zip\r"
10
+ expect eof
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ rm -rf website*
4
+ pnpm run build
5
+ zip -r website.zip ../website/
6
+ scp website.zip
[email protected] :/home/aosc/web/
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments