1
0
mirror of https://github.com/142vip/408CSFamily.git synced 2026-02-03 02:23:38 +08:00
Files
408CSFamily/.github/workflows/gh-deploy.yml

44 lines
1.0 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
## 参考资料https://v2.vuepress.vuejs.org/zh/guide/deployment.html#github-pages
name: gh-deploy
on:
push:
branches:
- master
- next
workflow_dispatch:
jobs:
deploy-github:
name: "部署到Github"
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v3
with:
# “最近更新时间” 等 git 日志相关信息,需要拉取全部提交记录
fetch-depth: 0
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16.20.2
- name: PNPM Install
uses: pnpm/action-setup@v2
with:
version: 7
run_install: true
# 运行构建脚本
- name: Build VuePress Site
run: ./scripts/bundle build_proxy
- name: Deploy to GitHub Page
uses: crazy-max/ghaction-github-pages@v3
with:
target_branch: pages/github
build_dir: docs/.vuepress/dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}