Skip to content

Commit

Permalink
添加私服部署
Browse files Browse the repository at this point in the history
  • Loading branch information
ChenSino committed Nov 6, 2024
1 parent c652397 commit 7b5c3f7
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

name: 部署文档
name: ChenSino博客部署

on:
push:
Expand All @@ -18,8 +17,6 @@ jobs:
# 如果你文档需要 Git 子模块,取消注释下一行
# submodules: true



- name: 设置 Node.js
uses: actions/setup-node@v3
with:
Expand All @@ -36,10 +33,28 @@ jobs:
npm run docs:build
> docs/.vuepress/dist/.nojekyll
- name: 部署文档
- name: 部署文档到github.io
uses: JamesIves/github-pages-deploy-action@v4
with:
# 这是文档部署到的分支名称
branch: gh-pages
folder: docs/.vuepress/dist

# 上传打包资源
- name: 部署到私服
uses: easingthemes/ssh-deploy@main
with:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
ARGS: "-rlgoDzvc -i"
SOURCE: "docs/.vuepress/dist/"
REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
REMOTE_USER: ${{ secrets.REMOTE_USER }}
REMOTE_PORT: ${{ secrets.REMOTE_PORT }}
TARGET: '/etc/nginx/www/chensino.github.io'
SCRIPT_BEFORE: |
whoami
ls -al
SCRIPT_AFTER: |
whoami
ls -al
echo $RSYNC_STDOUT

0 comments on commit 7b5c3f7

Please sign in to comment.