Skip to content

Commit d9640f4

Browse files
author
root
committed
ci: migrate to github actions
1 parent 22a27c9 commit d9640f4

File tree

4 files changed

+83
-50
lines changed

4 files changed

+83
-50
lines changed

.gitcode/.gitlab-ci.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

.github/workflows/deploy.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# 这里的名字随便起,显示在 Actions 页面
2+
name: Deploy VitePress site to Pages
3+
4+
on:
5+
# 当推送到 master 分支时触发
6+
push:
7+
branches: [master]
8+
9+
# 允许手动触发
10+
workflow_dispatch:
11+
12+
# 设置权限,允许 Actions 修改仓库内容 (发布 Pages 需要)
13+
permissions:
14+
contents: read
15+
pages: write
16+
id-token: write
17+
18+
# 定义并发策略,防止多次推送导致构建冲突
19+
concurrency:
20+
group: pages
21+
cancel-in-progress: false
22+
23+
jobs:
24+
# 构建任务
25+
build:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- name: Checkout
29+
uses: actions/checkout@v4
30+
with:
31+
fetch-depth: 0 # 如果没用到 Last Updated 功能,可以设为 1 加快速度
32+
33+
- name: Setup Node
34+
uses: actions/setup-node@v4
35+
with:
36+
node-version: 20
37+
cache: npm
38+
39+
- name: Setup Pages
40+
uses: actions/configure-pages@v5
41+
42+
- name: Install dependencies
43+
run: npm ci # 比 npm install 更干净快速
44+
45+
- name: Build with VitePress
46+
run: npm run docs:build # 确保你的 package.json 里是 "vitepress build docs"
47+
48+
- name: Upload artifact
49+
uses: actions/upload-pages-artifact@v3
50+
with:
51+
path: 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

.gitlab-ci.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

docs/.vitepress/config.mts

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,28 @@ export default defineConfig({
44
title: "Verl-Ascend Docs",
55
description: "Verl-Ascend 全栈开发文档",
66

7-
// 忽略死链接检查(防止你还没创建文件时报错)
7+
// 1. 【关键修改】GitHub Pages 必须配置 base 路径
8+
// 格式为: /仓库名称/ (注意前后都要有斜杠)
9+
base: '/verl-ascend-docs/',
10+
11+
// 忽略死链接检查
812
ignoreDeadLinks: true,
913

1014
themeConfig: {
1115
siteTitle: 'Verl-Ascend 文档中心',
1216

13-
// 顶部导航栏:保持极简,只留首页和GitHub
17+
// 2. 【修改】将顶部导航链接更新为 GitHub 地址
18+
// 请将链接中的 YourUsername 替换为你实际的 GitHub 用户名
1419
nav: [
1520
{ text: '首页', link: '/' },
16-
{ text: 'GitHub/GitCode', link: 'https://gitcode.com/Justbin/verl-ascend-docs' }
21+
{ text: 'GitHub 仓库', link: 'https://github.com/justbin-coder/verl-ascend-docs' }
1722
],
1823

19-
// 侧边栏:核心改动在这里
20-
// 使用数组结构,代表这是“全局侧边栏”,所有页面都显示这个目录
24+
// 侧边栏保持不变
2125
sidebar: [
2226
{
2327
text: '🚀 快速入门',
24-
collapsed: false, // 默认展开
28+
collapsed: false,
2529
items: [
2630
{ text: '项目简介', link: '/intro/about' },
2731
{ text: '环境安装', link: '/intro/install' },
@@ -39,7 +43,7 @@ export default defineConfig({
3943
},
4044
{
4145
text: '🔥 进阶案例',
42-
collapsed: true, // 默认折叠,保持界面整洁
46+
collapsed: true,
4347
items: [
4448
{ text: '多机多卡训练', link: '/advanced/multi-node' },
4549
{ text: '混合精度调优', link: '/advanced/amp' },
@@ -72,13 +76,20 @@ export default defineConfig({
7276
}
7377
],
7478

79+
// 3. 【修改】更新右上角的小图标链接到 GitHub
7580
socialLinks: [
76-
{ icon: 'github', link: 'https://gitcode.com/Justbin/verl-ascend-docs' }
81+
{ icon: 'github', link: 'https://github.com/justbin-coder/verl-ascend-docs' }
7782
],
7883

7984
// 开启本地搜索
8085
search: {
8186
provider: 'local'
87+
},
88+
89+
// 推荐添加:页脚信息
90+
footer: {
91+
message: 'Released under the MIT License.',
92+
copyright: 'Copyright © 2024 Verl-Ascend Team'
8293
}
8394
}
8495
})

0 commit comments

Comments
 (0)