feat: aliyun cloud and tencent cloud server #57
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: deploy blog | |
on: | |
#监听push操作 | |
push: | |
branches: | |
# master分支,你也可以改成其他分支 | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- name: Install Node.js | |
uses: actions/[email protected] | |
with: | |
node-version: '18.18.1' | |
- uses: pnpm/[email protected] | |
name: Install pnpm dependencies | |
with: | |
version: 9.5.0 | |
run_install: true | |
- name: Run build task | |
run: pnpm build | |
- name: Deploy to tencent cloud server | |
uses: easingthemes/[email protected] | |
env: | |
SSH_PRIVATE_KEY: ${{ secrets.SSH_KEY }} | |
ARGS: '-rltgoDzvO --delete' | |
SOURCE: '.output/' | |
REMOTE_HOST: '62.234.163.223' | |
REMOTE_USER: root | |
TARGET: '/home/blog' # 打包后的 dist 文件夹将放在 | |
# EXCLUDE: "node_modules,.git,.github" | |
- name: Deploy to aliyun cloud server | |
uses: easingthemes/[email protected] | |
env: | |
SSH_PRIVATE_KEY: ${{ secrets.SSH_KEY }} | |
ARGS: '-rltgoDzvO --delete' | |
SOURCE: '.output/' | |
REMOTE_HOST: '182.92.222.231' | |
REMOTE_USER: root | |
TARGET: '/home/blog' # 打包后的 dist 文件夹将放在 | |
# EXCLUDE: "node_modules,.git,.github" |