Skip to content

Branch joy

Branch joy #56

Workflow file for this run

name: TXDeploy
on:
pull_request:
push:
branches:
- docs
paths:
- 'packages/**/**'
- 'docs/**/**'
- 'scripts/**/**'
- 'package.json'
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2.3.1
- name: Install & Build 🔧 # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built.
run: npm i
- name: Bootstrap🔧 # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built.
run: ./node_modules/.bin/lerna bootstrap
- name: DocsBuild🔧 # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built.
run: npm run docsBuild
- name: Remove zips🔧 # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built.
run: rm -rf *.zip
- name: Deploy
uses: easingthemes/ssh-deploy@main
env:
# 本地.ssh文件下的私钥id_rsa,存在secrets的TOKEN中
SSH_PRIVATE_KEY: ${{ secrets.JOY_PRIVATE_KEY }}
# 复制操作的参数。"-avzr --delete"意味部署时清空服务器目标目录下的文件
# 源目录,相对于$GITHUB_WORKSPACE根目录的路径
SOURCE: docs/.vitepress/dist/
# 服务器域名
REMOTE_HOST: ${{ secrets.GP_TX_IP }}
# 腾讯云默认用户名为root
REMOTE_USER: root
# 目标目录
TARGET: /data/web-packages/p/traction-widget