更新lock #105
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: Build app and deploy to Tencent | |
on: | |
#监听push操作 | |
push: | |
branches: | |
# main分支,你也可以改成其他分支 | |
- main | |
jobs: | |
# 任务ID | |
build: | |
# 运行环境 | |
runs-on: ubuntu-latest | |
# 步骤 | |
steps: | |
# 使用别人的action | |
- uses: actions/checkout@v2 | |
# 步骤名称 | |
- name: npm install | |
# 步骤执行指令 | |
run: npm install | |
- name: npm run docs:build | |
run: npm run docs:build | |
# 命名这个任务为发布Deploy | |
- name: Deploy | |
# 因为构建之后,需要把代码上传到服务器上,所以需要连接到ssh,并且做一个拷贝操作 | |
uses: cross-the-world/scp-pipeline@master | |
env: | |
WELCOME: "ssh scp ssh pipelines" | |
LASTSSH: "Doing something after copying" | |
with: | |
host: ${{ secrets.USER_HOST }} | |
user: ${{ secrets.USER_NAME }} | |
pass: ${{ secrets.USER_PASS }} | |
connect_timeout: 10s | |
local: "./docs/.vitepress/dist/*" | |
remote: /var/www/blog-site/dist" |