Skip to content

🎨 style: format

🎨 style: format #57

Workflow file for this run

name: docs
on:
# 每当 push 到 main 分支时触发部署
push:
branches: [dev]
# 手动触发部署
workflow_dispatch:
jobs:
docs:
runs-on: ubuntu-latest
steps:
- name: Checkout this
# @see https://github.com/actions/checkout
uses: actions/checkout@v3
with:
ssh-key: ${{ secrets.ID_MOBILE_ROBOT_CORE }}
submodules: true # Fetch private submodules
- name: remove core docs
run: rm -rf core/docs/core
- name: Contribute List
# @see https://github.com/marketplace/actions/contribute-list
uses: akhilmhdh/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
use_username: true
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Run install
uses: borales/actions-yarn@v4
with:
cmd: install # will run `yarn install` command
- name: Build VuePress site
run: yarn docs:build
- name: Deploy to GitHub Pages
# @see https://github.com/crazy-max/ghaction-github-pages
uses: crazy-max/ghaction-github-pages@v2
with:
# 部署到 docs 分支
target_branch: docs
# 部署目录为 VuePress 的默认输出目录
build_dir: core/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 }}