Skip to content

更新文档

更新文档 #36

Workflow file for this run

# 构建vuepress,并提交到pages分支
name: deploy
on:
push:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
# 首先生成拉取node文件
- name: Node install
uses: actions/setup-node@v1
with:
node-version: '16.x'
# 缓存 node_modules
- name: Cache dependencies
uses: actions/cache@v4
id: npm-cache
with:
path: |
**/node_modules
key: ${{ runner.os }}-npm-cache
restore-keys: |
${{ runner.os }}-npm-
# 如果缓存没有命中,安装依赖
- name: Install dependencies
if: steps.npm-cache.outputs.cache-hit != 'true'
run: npm install vuepress
# 运行构建脚本
- name: Build VuePress site
run: npm run docs:build
# 提交
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@4.1.4
with:
token: ${{ secrets.ACTION_TOKEN }}
repository-name: dobyte/dobyte.github.io
branch: pages
folder: ./docs/.vuepress/dist
clean: true
force: true