Skip to content

Commit 486e758

Browse files
committed
set ssh push
1 parent 7ec3ec8 commit 486e758

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/build.yml

+7-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ name: Build
22
on: push
33
jobs:
44
build:
5+
env:
6+
HOST: ${{ secrets.HOST }}
57
runs-on: ubuntu-latest
68
steps:
79
- name: Checkout code
@@ -12,5 +14,8 @@ jobs:
1214
run: npm install -g yarn
1315
- name: Build
1416
run: yarn && yarn build
15-
- name: List files
16-
run: ls
17+
- name: Generate SSH Key File
18+
run: echo "${{ secrets.RSA }}" > ~/.ssh/id_rsa
19+
- name: Upload Files
20+
run: |
21+
scp -r dist/* liubin@$HOST:/home/web/www -i ~/.ssh/id_rsa

0 commit comments

Comments
 (0)