add navbar config #30
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: docs | |
on: | |
# 每当 push 到 main 分支时触发部署 | |
push: | |
branches: [main] | |
jobs: | |
docs: | |
runs-on: ubuntu-latest | |
env: | |
NODE_VERSION: '16' | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
# “最近更新时间” 等 git 日志相关信息,需要拉取全部提交记录 | |
fetch-depth: 0 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v2 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
cache: pnpm | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Build documentation site | |
run: pnpm docs:build | |
# 部署到腾讯云服务器 | |
- name: Deploy to Staging My server | |
uses: easingthemes/[email protected] | |
env: | |
#私钥 | |
SSH_PRIVATE_KEY: ${{ secrets.MY_TENCENT_SERVER_PRIVATE_SECRET_KEY }} #后面指定为该仓库配置的私钥 | |
ARGS: "-rltgoDzvO" | |
SOURCE: 'docs/.vuepress/dist/' | |
REMOTE_HOST: '124.221.154.95' | |
REMOTE_USER: 'root' | |
TARGET: '/home/blog/' | |
SCRIPT_BEFORE: | | |
rm -rf /home/blog/* |