Skip to content

Commit 9da5fb1

Browse files
committed
不知道修改了什么
1 parent 8d12fc3 commit 9da5fb1

File tree

2 files changed

+68
-68
lines changed

2 files changed

+68
-68
lines changed

.github/workflows/deploy.yml

Lines changed: 67 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,67 @@
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-
# with:
37-
# version: 9
38-
- uses: oven-sh/setup-bun@v1 # 如果使用 Bun,请取消注释
39-
- name: Setup Node
40-
uses: actions/setup-node@v4
41-
with:
42-
node-version: 22
43-
- name: Setup Pages
44-
uses: actions/configure-pages@v4
45-
- name: Install vitepress
46-
run: bun add -D vitepress@next
47-
- name: Install dependencies
48-
run: bun install # 或 pnpm install / yarn install / bun install
49-
- name: Build with VitePress
50-
run: bun run docs:build # 或 pnpm docs:build / yarn docs:build / bun run docs:build
51-
- name: Upload artifact
52-
uses: actions/upload-pages-artifact@v3
53-
with:
54-
path: docs/.vitepress/dist
55-
56-
# 部署工作
57-
deploy:
58-
environment:
59-
name: github-pages
60-
url: ${{ steps.deployment.outputs.page_url }}
61-
needs: build
62-
runs-on: ubuntu-latest
63-
name: Deploy
64-
steps:
65-
- name: Deploy to GitHub Pages
66-
id: deployment
67-
uses: actions/deploy-pages@v4
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+
# with:
37+
# version: 9
38+
- uses: oven-sh/setup-bun@v1 # 如果使用 Bun,请取消注释
39+
- name: Setup Node
40+
uses: actions/setup-node@v4
41+
with:
42+
node-version: 22
43+
- name: Setup Pages
44+
uses: actions/configure-pages@v4
45+
- name: Install vitepress
46+
run: bun add -D vitepress@next
47+
- name: Install dependencies
48+
run: bun install # 或 pnpm install / yarn install / bun install
49+
- name: Build with VitePress
50+
run: bun run docs:build # 或 pnpm docs:build / yarn docs:build / bun run docs:build
51+
- name: Upload artifact
52+
uses: actions/upload-pages-artifact@v3
53+
with:
54+
path: docs/.vitepress/dist
55+
56+
# 部署工作
57+
deploy:
58+
environment:
59+
name: github-pages
60+
url: ${{ steps.deployment.outputs.page_url }}
61+
needs: build
62+
runs-on: ubuntu-latest
63+
name: Deploy
64+
steps:
65+
- name: Deploy to GitHub Pages
66+
id: deployment
67+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
node_modules/
1+
node_modules/
22
docs/.vitepress/dist/

0 commit comments

Comments
 (0)