fix: block level code support #62
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
# deploy-mysite.yml | |
name: Deploy to mysite | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the repository using git | |
uses: actions/checkout@v3 | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- uses: pnpm/action-setup@v3 | |
name: Install pnpm | |
with: | |
version: 8 | |
run_install: true | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build | |
run: pnpm run build:mysite | |
- name: Deploy to Server | |
uses: easingthemes/ssh-deploy@main | |
with: | |
# 本地.ssh文件下的私钥id_rsa,存在secrets的PRIVATE_KEY中 | |
SSH_PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} | |
# 复制操作的参数。"-avzr --delete"意味部署时清空服务器目标目录下的文件 | |
ARGS: "-avz --delete" | |
# 源目录 | |
SOURCE: "./dist/" | |
# 部署目标主机 | |
REMOTE_HOST: ${{ secrets.HOST }} | |
# 部署目标主机端口 | |
REMOTE_PORT: ${{ secrets.PORT }} | |
# 登录用户 | |
REMOTE_USER: ${{ secrets.USER }} | |
# 部署目标目录 | |
TARGET: ${{ secrets.TARGET }} |