Skip to content

Commit

Permalink
ci: deploy-vitepress.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ktKongTong committed Dec 28, 2024
1 parent b1e009f commit fe8ece3
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/deploy-vitepress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,26 @@ env:
jobs:
check-if-need-deploy:
runs-on: ubuntu-latest
outputs:
doc-changed: ${{ steps.diff.outputs.count > 0 }}
steps:
- uses: actions/checkout@v4
with:
ref: 'master'
fetch-depth: 0
- name: check diff
run: |
- uses: technote-space/get-diff-action@v6
id: diff
with:
PATTERNS: |
docs/**/*.md
SET_ENV_NAME_COUNT: DIFF_COUNT
- name: show diff result
run:
echo ${{ env.GIT_DIFF }}
echo ${{ env.DIFF_COUNT }}
build-and-deploy:
runs-on: ubuntu-latest
needs: [ check-if-need-deploy ]
if: ${{ needs.check-if-need-deploy.outputs.doc-changed }}
steps:
- uses: actions/checkout@v4
with:
Expand Down

0 comments on commit fe8ece3

Please sign in to comment.