Skip to content

Commit bf55229

Browse files
feat: 增加docs发布流
1 parent 8305735 commit bf55229

File tree

4 files changed

+75
-2
lines changed

4 files changed

+75
-2
lines changed

.github/workflows/docs-release.yml

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# 构建 VitePress 站点并将其部署到 GitHub Pages 的示例工作流程
2+
#
3+
name: Deploy VitePress site to Pages
4+
5+
on:
6+
# 在针对 `main` 分支的推送上运行。如果你
7+
# 使用 `master` 分支作为默认分支,请将其更改为 `master`
8+
push:
9+
branches: [main]
10+
11+
# 允许你从 Actions 选项卡手动运行此工作流程
12+
workflow_dispatch:
13+
14+
# 设置 GITHUB_TOKEN 的权限,以允许部署到 GitHub Pages
15+
permissions:
16+
contents: read
17+
pages: write
18+
id-token: write
19+
20+
# 只允许同时进行一次部署,跳过正在运行和最新队列之间的运行队列
21+
# 但是,不要取消正在进行的运行,因为我们希望允许这些生产部署完成
22+
concurrency:
23+
group: pages
24+
cancel-in-progress: false
25+
26+
jobs:
27+
# 构建工作
28+
build:
29+
runs-on: ubuntu-latest
30+
steps:
31+
- name: Checkout
32+
uses: actions/checkout@v4
33+
with:
34+
fetch-depth: 0 # 如果未启用 lastUpdated,则不需要
35+
# - uses: pnpm/action-setup@v3 # 如果使用 pnpm,请取消注释
36+
# - uses: oven-sh/setup-bun@v1 # 如果使用 Bun,请取消注释
37+
- name: Setup Node
38+
uses: pnpm/action-setup@v3
39+
with:
40+
node-version: 20
41+
cache: pnpm # 或 pnpm / yarn
42+
- name: Setup Pages
43+
uses: actions/configure-pages@v4
44+
- name: Install dependencies
45+
run: pnpm i # 或 pnpm install / yarn install / bun install
46+
- name: Build with VitePress
47+
run: pnpm docs:build # 或 pnpm docs:build / yarn docs:build / bun run docs:build
48+
- name: Upload artifact
49+
uses: actions/upload-pages-artifact@v3
50+
with:
51+
path: packages/docs/.vitepress/dist
52+
53+
# 部署工作
54+
deploy:
55+
environment:
56+
name: github-pages
57+
url: ${{ steps.deployment.outputs.page_url }}
58+
needs: build
59+
runs-on: ubuntu-latest
60+
name: Deploy
61+
steps:
62+
- name: Deploy to GitHub Pages
63+
id: deployment
64+
uses: actions/deploy-pages@v4

packages/docs/.vitepress/config.mts

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ export default defineConfig({
55
cacheDir: './.vitepress/.vite' ,
66
srcDir: '.',
77
title: "🚀next-auth-oauth",
8+
lastUpdated: true ,
89
description: "next-auth-oauth,一款符合中国国情的第三方登录集成方案",
910
themeConfig: {
1011
// https://vitepress.dev/reference/default-theme-config
@@ -13,6 +14,10 @@ export default defineConfig({
1314
{ text: '快速启动', link: '/quickstart' },
1415
{ text: '文档', link: '/markdown-examples' }
1516
],
17+
footer: {
18+
message: 'Released under the MIT License.',
19+
copyright: 'Copyright © 2024-present Nextjs.Boy'
20+
},
1621

1722
sidebar: [
1823
{

packages/docs/index.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ hero:
1010
actions:
1111
- theme: brand
1212
text: 快速启动
13-
link: /markdown-examples
13+
link: /quickstart
1414
- theme: alt
1515
text: Github访问
1616
link: https://github.com/liuhuapiaoyuan/next-auth-oauth
@@ -28,6 +28,10 @@ features:
2828
details: 配置 `bindPage` 支持自定义授权绑定页面 🎨
2929
- title: 国产化第三方登录集成
3030
details: 支持 `微信公众号登录` 🐉、`微信网页登录` 🌐、`Gitee` 登录 📚
31+
- title: 微信公众关注登录
32+
details: 支持 `非认证公众号验证码登录`,`支持认证账号场景二维码`登录
33+
- title: 适配国产OIDC服务商
34+
details: 支持 `Authing`一键配置 📚
3135
---
3236

3337

packages/docs/quickstart.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ unBindOauthAccountInfo().then(() => {
167167

168168
## 许可证
169169

170-
该项目采用 [MIT 许可证](LICENSE) 进行授权。
170+
该项目采用 [MIT 许可证] 进行授权。
171171

172172
---
173173

0 commit comments

Comments
 (0)