Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 8faf4f6

Browse files
committed
style: update workflows and index page
1 parent 891b5f1 commit 8faf4f6

File tree

6 files changed

+47
-45
lines changed

6 files changed

+47
-45
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/prettier.yml‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@ name: Prettier
22

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

77
jobs:
88
prettier:
99
runs-on: ubuntu-latest
1010

1111
steps:
12-
- name: Checkout
13-
uses: actions/checkout@v2
14-
with:
15-
ref: ${{ github.head_ref }}
12+
- name: Checkout
13+
uses: actions/checkout@v2
14+
with:
15+
ref: ${{ github.head_ref }}
1616

17-
- name: Prettify code
18-
uses: creyD/prettier_action@v3.3
19-
with:
20-
prettier_options: --write **/*.{js,c,cpp,go,rb,java,cs,py,scala,md}
21-
commit_message: 'style: prettify code'
22-
env:
23-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17+
- name: Prettify code
18+
uses: creyD/prettier_action@v3.3
19+
with:
20+
prettier_options: --write **/*.{js,c,cpp,go,rb,java,cs,py,scala,md}
21+
commit_message: "style: prettify code"
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

‎.github/workflows/rebase.yml‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Automatic Rebase
22

3-
on:
3+
on:
44
issue_comment:
55
types: [created]
66

@@ -10,11 +10,11 @@ jobs:
1010
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase')
1111
runs-on: ubuntu-latest
1212
steps:
13-
- name: Checkout the latest code
14-
uses: actions/checkout@v2
15-
with:
16-
fetch-depth: 0
17-
- name: Automatic Rebase
18-
uses: cirrus-actions/rebase@1.4
19-
env:
20-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
13+
- name: Checkout the latest code
14+
uses: actions/checkout@v2
15+
with:
16+
fetch-depth: 0
17+
- name: Automatic Rebase
18+
uses: cirrus-actions/rebase@1.4
19+
env:
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

‎.github/workflows/sync.yml‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,25 @@ name: Sync
22

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

77
jobs:
88
sync:
99
runs-on: ubuntu-latest
1010
if: github.repository == 'doocs/leetcode'
1111
steps:
12-
- name: Sync to gitee.com
13-
uses: wearerequired/git-mirror-action@master
14-
env:
12+
- name: Sync to gitee.com
13+
uses: wearerequired/git-mirror-action@master
14+
env:
1515
SSH_PRIVATE_KEY: ${{ secrets.RSA_PRIVATE_KEY }}
16-
with:
16+
with:
1717
source-repo: git@github.com:doocs/leetcode.git
1818
destination-repo: git@gitee.com:Doocs/leetcode.git
1919

20-
- name: Build Gitee Pages
21-
uses: yanglbme/gitee-pages-action@main
22-
with:
20+
- name: Build Gitee Pages
21+
uses: yanglbme/gitee-pages-action@main
22+
with:
2323
gitee-username: yanglbme
2424
gitee-password: ${{ secrets.GITEE_PASSWORD }}
2525
gitee-repo: doocs/leetcode
26-
branch: main
26+
branch: main

‎.gitignore‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
.idea/
22
.DS_Store
3-
.vscode
3+
.vscode
4+
/node_modules

‎index.html‎

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
<!DOCTYPE html>
22
<html lang="en">
3+
34
<head>
45
<meta charset="UTF-8">
56
<title>LeetCode、剑指Offer、程序员面试金典题解</title>
67
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
7-
<meta name="keywords" content="doc,docs,doocs,documentation,github,gitee,coding,pages,leetcode,coding-interview,cracking-the-coding-interview,yanglbme">
8+
<meta name="keywords"
9+
content="doc,docs,doocs,documentation,github,gitee,coding,pages,leetcode,coding-interview,cracking-the-coding-interview,yanglbme">
810
<meta name="description" content="LeetCode、剑指Offer、程序员面试金典题解">
9-
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
11+
<meta name="viewport"
12+
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
1013
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify/lib/themes/vue.css">
1114
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify-dark-mode@0.6.1/dist/style.css" />
1215
<link rel="icon" type="image/png" sizes="32x32" href="images/favicon-32x32.png">
@@ -33,7 +36,7 @@
3336
name: 'leetcode',
3437
logo: '/images/doocs-leetcode.png',
3538
search: [
36-
'/','/solution/','/lcof/','/lcci/', '/basic/'
39+
'/','/solution/','/lcof/','/lcci/', '/basic/'
3740
],
3841
loadSidebar: 'summary.md',
3942
auto2top: true,
@@ -66,13 +69,10 @@
6669
function (hook, vm) {
6770
hook.beforeEach(function (html) {
6871
const en = vm.route.file.indexOf('README_EN') > -1
69-
if (/githubusercontent\.com/.test(vm.route.file)) {
70-
url = vm.route.file
71-
.replace('raw.githubusercontent.com', 'github.com')
72-
.replace(/\/main/, '/blob/main')
73-
} else {
74-
url = 'https://github.com/doocs/leetcode/blob/main/' + vm.route.file
75-
}
72+
const userContent = /githubusercontent\.com/.test(vm.route.file)
73+
const url = userContent ? vm.route.file
74+
.replace('raw.githubusercontent.com', 'github.com')
75+
.replace(/\/main/, '/blob/main') : 'https://github.com/doocs/leetcode/blob/main/' + vm.route.file
7676

7777
const github = `[GitHub](${url})`
7878
const gitee = `[Gitee](${url.replace("github", "gitee")})`
@@ -110,4 +110,5 @@
110110
<script src="//cdn.jsdelivr.net/npm/docsify-tabs@1"></script>
111111
<script src="//cdn.jsdelivr.net/npm/docsify-pagination/dist/docsify-pagination.min.js"></script>
112112
</body>
113-
</html>
113+
114+
</html>

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /