Skip to content

Commit

Permalink
chore: change github action
Browse files Browse the repository at this point in the history
  • Loading branch information
ruofee committed Sep 12, 2023
1 parent 041702e commit 208f447
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/depoly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,20 @@ on:
- .eslintrc.js
jobs:
deploy:
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- name: Checkout # 1. 将仓库内master分支的内容下载到工作目录
uses: actions/checkout@v2
- name: Install # 2. 安装依赖
run: yarn
- name: Build # 3. 打包
run: yarn docs:build
- name: Deploy to Server # 4. 推到服务器
uses: AEnterprise/rsync-deploy@v1.0
- name: Deploy to Server
uses: easingthemes/ssh-deploy@v2.1.5
env:
DEPLOY_KEY: ${{ secrets.KEY }} # 登录服务器的SSH私钥
ARGS: -avz --delete --exclude='*.pyc' # rsync参数,排除.pyc文件
SERVER_PORT: "22" # SSH端口
FOLDER: ./docs/.vuepress/dist/ # 要推送的文件夹,路径相对于代码仓库的根目录
SERVER_IP: ${{ secrets.HOST }} # 引用配置,服务器的IP/domain
USERNAME: ${{ secrets.USER }} # 引用配置,服务器登录名
SERVER_DESTINATION: ${{ secrets.PATH }} # 部署到目标文件夹
SSH_PRIVATE_KEY: ${{ secrets.KEY }}
ARGS: '-avz --delete --exclude *.js.map'
SOURCE: './docs/.vuepress/dist'
REMOTE_HOST: ${{ secrets.HOST }}
REMOTE_USER: ${{ secrets.USER }}
TARGET: ${{ secrets.PATH }}

0 comments on commit 208f447

Please sign in to comment.