Skip to content

Commit

Permalink
chore: update github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
yanglbme committed Apr 25, 2021
1 parent cb78937 commit 99e5920
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 36 deletions.
17 changes: 0 additions & 17 deletions .github/workflows/branch-merge.yml

This file was deleted.

10 changes: 9 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,16 @@ jobs:
run: npm run build

- name: Deploy
uses: JamesIves/github-pages-deploy-action@4.0.0
uses: JamesIves/github-pages-deploy-action@4.1.1
with:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
BRANCH: gh-pages
FOLDER: dist

- name: Sync to Gitee
uses: wearerequired/git-mirror-action@master
env:
SSH_PRIVATE_KEY: ${{ secrets.GITEE_RSA_PRIVATE_KEY }}
with:
source-repo: [email protected]:doocs/md.git
destination-repo: [email protected]:Doocs/md.git
34 changes: 34 additions & 0 deletions .github/workflows/compress.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Compress

on:
push:
branches: [main]
paths:
- "**.jpg"
- "**.jpeg"
- "**.png"
- "**.webp"

jobs:
compress:
runs-on: ubuntu-latest
if: github.repository == 'doocs/md'
steps:
- name: Checkout Branch
uses: actions/checkout@v2

- name: Compress Images
uses: calibreapp/image-actions@master
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
compressOnly: true

- name: Commit Files
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git commit -m "[Automated] Optimize images" -a
- name: Push Changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
18 changes: 0 additions & 18 deletions .github/workflows/sync.yml

This file was deleted.

0 comments on commit 99e5920

Please sign in to comment.