Skip to content

Commit bca8812

Browse files
committed
refactor: update workflows and index page
1 parent 0a95366 commit bca8812

File tree

5 files changed

+77
-95
lines changed

5 files changed

+77
-95
lines changed

.github/workflows/branch-merge.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Merge Branch
22

33
on:
44
push:
5-
branches: [ imgbot ]
5+
branches: [imgbot]
66

77
jobs:
88
merge-branch:
@@ -13,5 +13,5 @@ jobs:
1313
with:
1414
github_token: ${{ github.token }}
1515
source_ref: ${{ github.ref }}
16-
target_branch: 'main'
17-
commit_message_template: '[Automated] Merged {source_ref} into {target_branch}'
16+
target_branch: "main"
17+
commit_message_template: "[Automated] Merged {source_ref} into {target_branch}"

.github/workflows/gradle.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Java CI
22

3-
on:
3+
on:
44
push:
55
branches:
66
- main

.github/workflows/prettier.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,22 @@ on:
44
pull_request:
55
push:
66
branches:
7-
- main
7+
- main
88

99
jobs:
1010
prettier:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- name: Checkout
15-
uses: actions/checkout@v2
16-
with:
17-
ref: ${{ github.head_ref }}
14+
- name: Checkout
15+
uses: actions/checkout@v2
16+
with:
17+
ref: ${{ github.head_ref }}
1818

19-
- name: Prettify code
20-
uses: creyD/prettier_action@v3.0
21-
with:
22-
prettier_options: --write **/*.{html,js,md}
23-
commit_message: 'style: prettify code'
24-
env:
25-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19+
- name: Prettify code
20+
uses: creyD/prettier_action@v3.3
21+
with:
22+
prettier_options: --write **/*.{md}
23+
commit_message: "style: prettify code"
24+
env:
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/sync.yml

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,24 @@ name: Sync
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [main]
66

77
jobs:
88
build:
99
runs-on: ubuntu-latest
1010
steps:
11-
- name: Sync to Gitee
12-
uses: wearerequired/git-mirror-action@master
13-
env:
14-
# 注意在 Settings->Secrets 配置 GITEE_RSA_PRIVATE_KEY
11+
- name: Sync to Gitee
12+
uses: wearerequired/git-mirror-action@master
13+
env:
1514
SSH_PRIVATE_KEY: ${{ secrets.GITEE_RSA_PRIVATE_KEY }}
16-
with:
17-
# 注意替换为你的 GitHub 源仓库地址
18-
source-repo: "git@github.com:doocs/data-structure-and-algorithm.git"
19-
# 注意替换为你的 Gitee 目标仓库地址
20-
destination-repo: "git@gitee.com:Doocs/data-structure-and-algorithm.git"
15+
with:
16+
source-repo: git@github.com:doocs/data-structure-and-algorithm.git
17+
destination-repo: git@gitee.com:Doocs/data-structure-and-algorithm.git
2118

22-
- name: Build Gitee Pages
23-
uses: yanglbme/gitee-pages-action@master
24-
with:
25-
# 注意替换为你的 Gitee 用户名
19+
- name: Build Gitee Pages
20+
uses: yanglbme/gitee-pages-action@main
21+
with:
2622
gitee-username: yanglbme
27-
# 注意在 Settings->Secrets 配置 GITEE_PASSWORD
2823
gitee-password: ${{ secrets.GITEE_PASSWORD }}
29-
# 注意替换为你的 Gitee 仓库
3024
gitee-repo: doocs/data-structure-and-algorithm
3125
branch: main

index.html

Lines changed: 51 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,54 @@
11
<!DOCTYPE html>
22
<html lang="en">
3-
<head>
4-
<meta charset="UTF-8" />
5-
<title>算法与数据结构</title>
6-
<meta
7-
name="viewport"
8-
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
9-
/>
10-
<link
11-
rel="stylesheet"
12-
href="//cdn.jsdelivr.net/npm/docsify/lib/themes/vue.css"
13-
/>
14-
<link
15-
rel="icon"
16-
type="image/png"
17-
sizes="32x32"
18-
href="images/favicon-32x32.png"
19-
/>
20-
<link
21-
rel="icon"
22-
type="image/png"
23-
sizes="16x16"
24-
href="images/favicon-16x16.png"
25-
/>
26-
</head>
27-
<body>
28-
<div id="app">本系列知识由 Doocs 开源社区总结发布</div>
29-
<script>
30-
window.$docsify = {
31-
name: "数据结构与算法",
32-
repo: "doocs/data-structure-and-algorithm",
33-
maxLevel: 3,
34-
auto2top: true,
35-
coverpage: true,
36-
coverpage: "docs/extra-page/cover.md",
37-
search: ["/"],
38-
plugins: [
39-
function (hook) {
40-
var footer = [
41-
"<hr/>",
42-
"<footer>",
43-
'<span>Copyright © 2018-2019 <a href="https://github.com/doocs" target="_blank">Doocs</a>. All rights reserved.</span><br>Welcome to join the <a href="https://github.com/doocs/intro" target="_blank">Doocs Open Source organization</a>.',
44-
"</footer>",
45-
].join("");
463

47-
hook.afterEach(function (html) {
48-
return html + footer;
49-
});
50-
},
51-
],
52-
};
53-
</script>
54-
<script src="//cdn.jsdelivr.net/npm/docsify/lib/docsify.min.js"></script>
55-
<script src="//cdn.jsdelivr.net/npm/prismjs/components/prism-c.min.js"></script>
56-
<script src="//cdn.jsdelivr.net/npm/prismjs/components/prism-bash.min.js"></script>
57-
<script src="//cdn.jsdelivr.net/npm/prismjs/components/prism-cpp.min.js"></script>
58-
<script src="//cdn.jsdelivr.net/npm/prismjs/components/prism-json.min.js"></script>
59-
<script src="//cdn.jsdelivr.net/npm/prismjs/components/prism-java.min.js"></script>
60-
<script src="//cdn.jsdelivr.net/npm/prismjs/components/prism-python.min.js"></script>
61-
<script src="//cdn.jsdelivr.net/npm/docsify-copy-code"></script>
62-
<script src="//cdn.jsdelivr.net/npm/docsify/lib/plugins/search.js"></script>
63-
<script src="//cdn.jsdelivr.net/npm/docsify/lib/plugins/emoji.js"></script>
64-
<script src="//cdn.jsdelivr.net/npm/docsify/lib/plugins/zoom-image.js"></script>
65-
</body>
66-
</html>
4+
<head>
5+
<meta charset="UTF-8" />
6+
<title>算法与数据结构</title>
7+
<meta name="viewport"
8+
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" />
9+
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify/lib/themes/vue.css" />
10+
<link rel="icon" type="image/png" sizes="32x32" href="images/favicon-32x32.png" />
11+
<link rel="icon" type="image/png" sizes="16x16" href="images/favicon-16x16.png" />
12+
</head>
13+
14+
<body>
15+
<div id="app">本系列知识由 Doocs 开源社区总结发布</div>
16+
<script>
17+
window.$docsify = {
18+
name: "数据结构与算法",
19+
repo: "doocs/data-structure-and-algorithm",
20+
maxLevel: 3,
21+
auto2top: true,
22+
coverpage: true,
23+
coverpage: "docs/extra-page/cover.md",
24+
search: ["/"],
25+
plugins: [
26+
function (hook) {
27+
var footer = [
28+
"<hr/>",
29+
"<footer>",
30+
'<span>Copyright © 2018-2021 <a href="https://github.com/doocs" target="_blank">Doocs</a>. All rights reserved.</span><br>Welcome to join the <a href="https://github.com/doocs/intro" target="_blank">Doocs Open Source organization</a>.',
31+
"</footer>",
32+
].join("");
33+
34+
hook.afterEach(function (html) {
35+
return html + footer;
36+
});
37+
},
38+
],
39+
};
40+
</script>
41+
<script src="//cdn.jsdelivr.net/npm/docsify/lib/docsify.min.js"></script>
42+
<script src="//cdn.jsdelivr.net/npm/prismjs/components/prism-c.min.js"></script>
43+
<script src="//cdn.jsdelivr.net/npm/prismjs/components/prism-bash.min.js"></script>
44+
<script src="//cdn.jsdelivr.net/npm/prismjs/components/prism-cpp.min.js"></script>
45+
<script src="//cdn.jsdelivr.net/npm/prismjs/components/prism-json.min.js"></script>
46+
<script src="//cdn.jsdelivr.net/npm/prismjs/components/prism-java.min.js"></script>
47+
<script src="//cdn.jsdelivr.net/npm/prismjs/components/prism-python.min.js"></script>
48+
<script src="//cdn.jsdelivr.net/npm/docsify-copy-code"></script>
49+
<script src="//cdn.jsdelivr.net/npm/docsify/lib/plugins/search.js"></script>
50+
<script src="//cdn.jsdelivr.net/npm/docsify/lib/plugins/emoji.js"></script>
51+
<script src="//cdn.jsdelivr.net/npm/docsify/lib/plugins/zoom-image.js"></script>
52+
</body>
53+
54+
</html>

0 commit comments

Comments
 (0)