Skip to content

refactor: build site with vitepress #2

refactor: build site with vitepress

refactor: build site with vitepress #2

Workflow file for this run

name: Compress
on:
push:
branches: [main]
paths:
- "**.jpg"
- "**.jpeg"
- "**.png"
- "**.webp"
workflow_dispatch:
jobs:
compress:
runs-on: ubuntu-latest
if: github.repository == 'doocs/technical-books'
steps:
- name: Checkout Branch
uses: actions/checkout@v3
- name: Compress Images
id: calibre
uses: calibreapp/image-actions@main
with:
githubToken: ${{ secrets.ACTION_TOKEN }}
compressOnly: true
- name: Commit Files
if: |
steps.calibre.outputs.markdown != ''
run: |
git config --local user.email "szuyanglb@outlook.com"
git config --local user.name "yanglbme"
git commit -m "chore: auto compress images" -a
- name: Push Changes
if: |
steps.calibre.outputs.markdown != ''
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.ACTION_TOKEN }}