mirror of
https://github.com/doocs/md.git
synced 2024-11-25 03:18:36 +08:00
chore: update github actions
This commit is contained in:
parent
cb7893756b
commit
99e5920d45
17
.github/workflows/branch-merge.yml
vendored
17
.github/workflows/branch-merge.yml
vendored
@ -1,17 +0,0 @@
|
|||||||
name: Merge Branch
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [imgbot]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
merge-branch:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- uses: everlytic/branch-merge@1.1.0
|
|
||||||
with:
|
|
||||||
github_token: ${{ github.token }}
|
|
||||||
source_ref: ${{ github.ref }}
|
|
||||||
target_branch: main
|
|
||||||
commit_message_template: "[Automated] Merged {source_ref} into {target_branch}"
|
|
10
.github/workflows/build.yml
vendored
10
.github/workflows/build.yml
vendored
@ -36,8 +36,16 @@ jobs:
|
|||||||
run: npm run build
|
run: npm run build
|
||||||
|
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
uses: JamesIves/github-pages-deploy-action@4.0.0
|
uses: JamesIves/github-pages-deploy-action@4.1.1
|
||||||
with:
|
with:
|
||||||
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
|
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
|
||||||
BRANCH: gh-pages
|
BRANCH: gh-pages
|
||||||
FOLDER: dist
|
FOLDER: dist
|
||||||
|
|
||||||
|
- name: Sync to Gitee
|
||||||
|
uses: wearerequired/git-mirror-action@master
|
||||||
|
env:
|
||||||
|
SSH_PRIVATE_KEY: ${{ secrets.GITEE_RSA_PRIVATE_KEY }}
|
||||||
|
with:
|
||||||
|
source-repo: git@github.com:doocs/md.git
|
||||||
|
destination-repo: git@gitee.com:Doocs/md.git
|
||||||
|
34
.github/workflows/compress.yml
vendored
Normal file
34
.github/workflows/compress.yml
vendored
Normal file
@ -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 "action@github.com"
|
||||||
|
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
.github/workflows/sync.yml
vendored
18
.github/workflows/sync.yml
vendored
@ -1,18 +0,0 @@
|
|||||||
name: Sync
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [main]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: github.repository == 'doocs/md'
|
|
||||||
steps:
|
|
||||||
- name: Sync to Gitee
|
|
||||||
uses: wearerequired/git-mirror-action@master
|
|
||||||
env:
|
|
||||||
SSH_PRIVATE_KEY: ${{ secrets.GITEE_RSA_PRIVATE_KEY }}
|
|
||||||
with:
|
|
||||||
source-repo: git@github.com:doocs/md.git
|
|
||||||
destination-repo: git@gitee.com:Doocs/md.git
|
|
Loading…
Reference in New Issue
Block a user