File tree Expand file tree Collapse file tree 6 files changed +65
-46
lines changed Expand file tree Collapse file tree 6 files changed +65
-46
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ name : Compress
2
+
3
+ on :
4
+ push :
5
+ branches : [main]
6
+ paths :
7
+ - " **.jpg"
8
+ - " **.jpeg"
9
+ - " **.png"
10
+ - " **.webp"
11
+ workflow_dispatch :
12
+
13
+ jobs :
14
+ compress :
15
+ runs-on : ubuntu-latest
16
+ if : github.repository == 'doocs/coding-interview'
17
+ steps :
18
+ - name : Checkout Branch
19
+ uses : actions/checkout@v2
20
+
21
+ - name : Compress Images
22
+ id : calibre
23
+ uses : calibreapp/image-actions@main
24
+ with :
25
+ githubToken : ${{ secrets.ACTION_TOKEN }}
26
+ compressOnly : true
27
+
28
+ - name : Commit Files
29
+ if : |
30
+ steps.calibre.outputs.markdown != ''
31
+ run : |
32
+ git config --local user.email "szuyanglb@outlook.com"
33
+ git config --local user.name "yanglbme"
34
+ git commit -m "chore: auto compress images" -a
35
+
36
+ - name : Push Changes
37
+ if : |
38
+ steps.calibre.outputs.markdown != ''
39
+ uses : ad-m/github-push-action@master
40
+ with :
41
+ github_token : ${{ secrets.ACTION_TOKEN }}
Original file line number Diff line number Diff line change 4
4
pull_request :
5
5
push :
6
6
branches :
7
- - main
7
+ - main
8
8
9
9
jobs :
10
10
prettier :
11
11
runs-on : ubuntu-latest
12
12
13
13
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 }}
18
18
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 }}
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 }}
Original file line number Diff line number Diff line change @@ -2,25 +2,25 @@ name: Sync
2
2
3
3
on :
4
4
push :
5
- branches : [ main ]
5
+ branches : [main]
6
6
7
7
jobs :
8
8
build :
9
9
runs-on : ubuntu-latest
10
10
steps :
11
- - uses : actions/checkout@v2
12
-
13
- - name : Sync to Gitee
14
- uses : wearerequired/git-mirror-action@master
15
- env :
11
+ - uses : actions/checkout@v2
12
+
13
+ - name : Sync to Gitee
14
+ uses : wearerequired/git-mirror-action@master
15
+ env :
16
16
SSH_PRIVATE_KEY : ${{ secrets.GITEE_RSA_PRIVATE_KEY }}
17
- with :
17
+ with :
18
18
source-repo : git@github.com:doocs/coding-interview.git
19
19
destination-repo : git@gitee.com:Doocs/coding-interview.git
20
20
21
- - name : Build Gitee Pages
22
- uses : yanglbme/gitee-pages-action@main
23
- with :
21
+ - name : Build Gitee Pages
22
+ uses : yanglbme/gitee-pages-action@main
23
+ with :
24
24
gitee-username : yanglbme
25
25
gitee-password : ${{ secrets.GITEE_PASSWORD }}
26
26
gitee-repo : doocs/coding-interview
Original file line number Diff line number Diff line change 1
1
# 《Effective Java》
2
2
3
- [ 电子书下载] ( https://github.com/joyang1/JavaInterview/tree/master/books )
4
-
5
3
## 第二章 创建和销毁对象
6
4
7
5
### 第 1 条:考虑用静态工厂方法代替构造器
Original file line number Diff line number Diff line change 99
99
} ) ;
100
100
101
101
hook . afterEach ( function ( html ) {
102
- const footer = [
103
- "<footer>" ,
104
- '<span>Copyright © 2018-2021 <a href="https://github.com/doocs" target="_blank">Doocs</a>. All rights reserved.' ,
105
- "</footer>" ,
106
- ] . join ( "" ) ;
102
+ const currentYear = new Date ( ) . getFullYear ( )
103
+ const footer = `<footer><span>Copyright © 2018-${ currentYear } <a href="https://github.com/doocs" target="_blank">Doocs</a>. All Rights Reserved.</footer>`
107
104
return html + footer ;
108
105
} ) ;
109
106
} ,
You can’t perform that action at this time.
0 commit comments