Skip to content

Update mindmap

Update mindmap #7

name: 自动构建部署 (2026/02/05)
on:
push:
branches: main
# 允许手动触发action
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # 拉取完整的 Git 历史记录以获取文章日期
ref: ${{ github.ref }} # 检出当前触发工作流的分支/标签(避免分离头指针状态)
fetch-tags: true # 拉取所有标签(推荐)
# - name: 下载ssh秘钥
# uses: shimataro/ssh-key-action@v2
# with:
# key: ${{ secrets.PRIVKEY }}
# known_hosts: 'just-a-placeholder-so-we-dont-get-errors'
# - name: 配置ssh
# run: |-
# ssh-keyscan -H ${{ secrets.IP }} >> ~/.ssh/known_hosts
# # cd ~/.ssh
# # ls -ao
# # cat ./known_hosts
# # cat ./id_rsa
- name: 安装 Node.js
# 使用action库 actions/setup-node安装node
uses: actions/setup-node@v4
with:
node-version: 22.x
# - name: 安装pnpm
# run: npm install -g pnpm
- name: 安装 pnpm
uses: pnpm/action-setup@v4
with:
version: 10
# 安装依赖
- name: 安装依赖
run: pnpm install
# - name: 构建
# run: pnpm run docs:build
- name: 构建文档
env:
NODE_OPTIONS: --max_old_space_size=8192
run: |-
pnpm run docs:build
> docs/.vuepress/dist/.nojekyll
# # SFTP全量推送
# - name: 推送
# uses: wlixcc/SFTP-Deploy-Action@v1.0
# with:
# username: '${{ secrets.USER }}' # 远程ssh用户名
# server: '${{ secrets.IP }}' # 引用github仓库secret
# ssh_private_key: ${{ secrets.PRIVKEY }} # 引用github仓库secret
# local_path: './docs/.vuepress/dist/*' # 对应本地build路径
# remote_path: ${{ secrets.Directory }} # 引用github仓库secret
# # Rsync异量推送
# - name: 推送
# uses: contention/rsync-deployments@v2.0.0
# with:
# flags: -avz --delete
# excludes:
# deploy_key: '~/.ssh/deploy_key'
# user: ${{ secrets.USER }}
# host: ${{ secrets.IP }}
# localpath: 'docs/.vuepress/dist'
# remotepath: '/web/blog'
- name: 推送
uses: crazy-max/ghaction-github-pages@v4
with:
target_branch: gh-pages
build_dir: docs/.vuepress/dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}