We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 77a94b9 commit 0f66df2Copy full SHA for 0f66df2
1 file changed
.github/workflows/upload.yml
@@ -0,0 +1,28 @@
1
+# .github/workflows/ssh-upload.yml
2
+# 将gh-pages分支的文件上传到服务器
3
+name: upload-to-server
4
+
5
+on:
6
+ workflow_run:
7
+ workflows: ["deploy"]
8
+ types:
9
+ - completed
10
11
+jobs:
12
+ upload:
13
+ runs-on: ubuntu-latest
14
15
+ steps:
16
+ - name: Checkout gh-pages
17
+ uses: actions/checkout@v3
18
+ with:
19
+ ref: gh-pages
20
21
+ - name: Deploy to Server via SSH
22
+ uses: appleboy/scp-action@v0.1.7
23
24
+ host: ${{ secrets.SSH_HOST }}
25
+ username: ${{ secrets.SSH_USER }}
26
+ key: ${{ secrets.SSH_PRIVATE_KEY }}
27
+ source: "./"
28
+ target: ${{ secrets.SSH_UPLOAD_PATH }} # 修改为你的服务器路径
0 commit comments