Skip to content

Commit

Permalink
feat: 增加github部署配置
Browse files Browse the repository at this point in the history
  • Loading branch information
clh committed Dec 3, 2024
1 parent 33ba12b commit 9333b96
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Deploy VitePress site to Pages

on:
push:
# 推送任意tags或者master分支推送的时候触发任务
tags:
- "*"
branches:
- master
workflow_dispatch:

jobs:
deploy-and-sync:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
with:
ref: "master"

- name: Install yarn
run: corepack enable

- uses: actions/setup-node@v3
with:
node-version: "18"
cache: "yarn"

- name: Install dependencies
run: yarn install

- name: Build Site
run: npm run docs:build

# 将文档产物提交到master分支
- name: Deploy for Github 🚀
uses: JamesIves/[email protected]
with:
branch: master
folder: docs/.vitepress/dist
# enable single-commit to reduce the repo size
single-commit: true
clean: true

0 comments on commit 9333b96

Please sign in to comment.