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 44 pull_request :
55 push :
66 branches :
7- - main
7+ - main
88
99jobs :
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.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
22
33on :
44 push :
5- branches : [ main ]
5+ branches : [main]
66
77jobs :
88 build :
99 runs-on : ubuntu-latest
1010 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 :
1616 SSH_PRIVATE_KEY : ${{ secrets.GITEE_RSA_PRIVATE_KEY }}
17- with :
17+ with :
1818 source-repo : git@github.com:doocs/coding-interview.git
1919 destination-repo : git@gitee.com:Doocs/coding-interview.git
2020
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 :
2424 gitee-username : yanglbme
2525 gitee-password : ${{ secrets.GITEE_PASSWORD }}
2626 gitee-repo : doocs/coding-interview
Original file line number Diff line number Diff line change 11# 《Effective Java》
22
3- [ 电子书下载] ( https://github.com/joyang1/JavaInterview/tree/master/books )
4-
53## 第二章 创建和销毁对象
64
75### 第 1 条:考虑用静态工厂方法代替构造器
Original file line number Diff line number Diff line change 9999 } ) ;
100100
101101 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>`
107104 return html + footer ;
108105 } ) ;
109106 } ,
You can’t perform that action at this time.
0 commit comments