File tree Expand file tree Collapse file tree 4 files changed +43
-36
lines changed
Expand file tree Collapse file tree 4 files changed +43
-36
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 3636 run : npm run build
3737
3838 - name : Deploy
39- uses : JamesIves/github-pages-deploy-action@4.0.0
39+ uses : JamesIves/github-pages-deploy-action@4.1.1
4040 with :
4141 ACCESS_TOKEN : ${{ secrets.ACCESS_TOKEN }}
4242 BRANCH : gh-pages
4343 FOLDER : dist
44+
45+ - name : Sync to Gitee
46+ uses : wearerequired/git-mirror-action@master
47+ env :
48+ SSH_PRIVATE_KEY : ${{ secrets.GITEE_RSA_PRIVATE_KEY }}
49+ with :
50+ source-repo : git@github.com:doocs/md.git
51+ destination-repo : git@gitee.com:Doocs/md.git
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+
12+ jobs :
13+ compress :
14+ runs-on : ubuntu-latest
15+ if : github.repository == 'doocs/md'
16+ steps :
17+ - name : Checkout Branch
18+ uses : actions/checkout@v2
19+
20+ - name : Compress Images
21+ uses : calibreapp/image-actions@master
22+ with :
23+ githubToken : ${{ secrets.GITHUB_TOKEN }}
24+ compressOnly : true
25+
26+ - name : Commit Files
27+ run : |
28+ git config --local user.email "action@github.com"
29+ git config --local user.name "GitHub Action"
30+ git commit -m "[Automated] Optimize images" -a
31+ - name : Push Changes
32+ uses : ad-m/github-push-action@master
33+ with :
34+ github_token : ${{ secrets.GITHUB_TOKEN }}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments