Skip to content

build(deps): bump JamesIves/github-pages-deploy-action from 4.6.8 to 4.6.9 in the actions-deps group #1437

build(deps): bump JamesIves/github-pages-deploy-action from 4.6.8 to 4.6.9 in the actions-deps group

build(deps): bump JamesIves/github-pages-deploy-action from 4.6.8 to 4.6.9 in the actions-deps group #1437

Workflow file for this run

# 构建vuepress,并提交到pages分支
name: Docs
on:
pull_request:
branches:
- "master"
push:
branches:
- "master"
jobs:
docs-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run markdown linter
uses: nosborn/github-action-markdown-cli@v3.3.0
with:
files: website/docs,README.md,pkg
config_file: ".github/markdown_lint_config.json"
docs-build-and-deploy:
if: github.event_name == 'push'
runs-on: ubuntu-latest
needs: docs-lint
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
# 首先生成拉取node文件
- name: Node install
uses: actions/setup-node@v4
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: cd website && npm install vuepress
# 运行构建脚本
- name: Build VuePress site
run: cd website && npm run docs:build
# 提交
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4.6.9
with:
branch: pages
folder: ./website/docs/.vuepress/dist