Skip to content

Commit fe8c69c

Browse files
committed
update deploy
1 parent 62fe057 commit fe8c69c

34 files changed

+3801
-3762
lines changed

.github/workflows/deploy.yml

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
1-
21
name: 部署文档
32

43
on:
54
push:
65
branches:
7-
- master # 只在master上push触发部署
6+
- docs # 只在 docs 上 push 触发部署
87
paths-ignore: # 下列文件的变更不触发部署,可以自行添加
98
- README.md
109
- LICENSE
1110
pull_request:
1211
branches:
13-
- master # 只在master上push触发部署
12+
- docs # 只在 docs 上 push 触发部署
1413
types: [closed]
1514

1615
permissions:
@@ -27,8 +26,6 @@ jobs:
2726
# 如果你文档需要 Git 子模块,取消注释下一行
2827
# submodules: true
2928

30-
31-
3229
- name: 设置 Node.js
3330
uses: actions/setup-node@v3
3431
with:
@@ -51,3 +48,30 @@ jobs:
5148
# 这是文档部署到的分支名称
5249
branch: gh-pages
5350
folder: src/.vuepress/dist
51+
52+
deploy-main:
53+
runs-on: ubuntu-latest
54+
55+
steps:
56+
- name: Checkout
57+
uses: actions/checkout@v3
58+
with:
59+
fetch-depth: 0
60+
# 如果你文档需要 Git 子模块,取消注释下一行
61+
# submodules: true
62+
63+
# 移动 src 中的文件到 dist 目录
64+
- name: move to dist
65+
run: |
66+
cp -r src/outline ./dist/
67+
cp -r src/ds ./dist/
68+
cp -r src/algorithm ./dist/
69+
cp -r src/problem ./dist/
70+
cp -r src/README.md ./dist/
71+
72+
- name: push to main
73+
uses: JamesIves/github-pages-deploy-action@v4
74+
with:
75+
# 这是文档部署到的分支名称
76+
branch: main
77+
folder: dist

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
1+
dist/
22
node_modules/
33
src/.vuepress/.cache/
44
src/.vuepress/.temp/

assets/image/react-1.png

-115 KB
Binary file not shown.

assets/image/react-10.png

-188 KB
Binary file not shown.

assets/image/react-11.png

-126 KB
Binary file not shown.

assets/image/react-12.png

-234 KB
Binary file not shown.

assets/image/react-13.png

-247 KB
Binary file not shown.

assets/image/react-14.png

-191 KB
Binary file not shown.

assets/image/react-2.png

-139 KB
Binary file not shown.

assets/image/react-3.png

-121 KB
Binary file not shown.

0 commit comments

Comments
 (0)