Skip to content

Merge pull request #28 from sunxfancy/dev #23

Merge pull request #28 from sunxfancy/dev

Merge pull request #28 from sunxfancy/dev #23

Workflow file for this run

name: Docs
on:
push:
branches: [ "master" ]
workflow_dispatch:
jobs:
docs:
name: Generating documentation
runs-on: ubuntu-latest
permissions:
contents: write
pages: write
steps:
- uses: actions/checkout@v3
with:
# “最近更新时间” 等 git 日志相关信息,需要拉取全部提交记录
fetch-depth: 0
- name: Install doxygen
run: sudo apt-get install -y doxygen graphviz
- name: Set permission
run: chmod a+x docs/.doxybook/doxybook2
- name: Build project
run: make doc-build
- name: Setup Node.js
uses: actions/setup-node@v3
with:
# 选择要使用的 node 版本
node-version: 20
# 缓存 yarn 依赖
cache: yarn
- name: Setup yarn
uses: borales/actions-yarn@v4
with:
cmd: install
# 运行构建脚本
- name: Build production bundle
uses: borales/actions-yarn@v4
with:
cmd: run cmake:docs # will run `yarn run build` command
# 查看 workflow 的文档来获取更多信息
# @see https://github.com/crazy-max/ghaction-github-pages
- name: Deploy to GitHub Pages
uses: crazy-max/ghaction-github-pages@v2
with:
# 部署到 gh-pages 分支
target_branch: gh-pages
# 部署目录为 VuePress 的默认输出目录
build_dir: build-linux-doc/docs/.vuepress/dist
env:
# @see https://docs.github.com/cn/actions/reference/authentication-in-a-workflow#about-the-github_token-secret
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}