Skip to content

Commit 99e5920

Browse files
committed
chore: update github actions
1 parent cb78937 commit 99e5920

File tree

4 files changed

+43
-36
lines changed

4 files changed

+43
-36
lines changed

.github/workflows/branch-merge.yml

-17
This file was deleted.

.github/workflows/build.yml

+9-1
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,16 @@ jobs:
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: [email protected]:doocs/md.git
51+
destination-repo: [email protected]:Doocs/md.git

.github/workflows/compress.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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 "[email protected]"
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 }}

.github/workflows/sync.yml

-18
This file was deleted.

0 commit comments

Comments
 (0)