Revert "添加文件变更检查步骤以决定是否执行构建和部署"
All checks were successful
Checking-doc / build-and-deploy (pull_request) Successful in 2m12s
deploying-doc / build-and-deploy (pull_request) Successful in 3m17s

This reverts commit 670e0615452338393e225a9f2d2c3020a6659a22.
This commit is contained in:
荆棘鸟文学社的小鸽子 2025-04-29 17:08:13 +08:00
parent fb9ed941d0
commit dc96fca00d

View File

@ -6,38 +6,7 @@ on:
types: [opened,synchronize]
jobs:
check-file-changes:
runs-on: ubuntu-latest
outputs:
should_run: ${{ steps.filter.outputs.should_run }}
steps:
- name: 🚚 Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: 📑 Check changed files
id: filter
run: |
CHANGED_FILES=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} || git diff --name-only HEAD~1 HEAD)
IMPORTANT_FILE_CHANGED=false
for file in $CHANGED_FILES; do
if [[ $file =~ \.(ts|yaml|json|js)$ ]]; then
IMPORTANT_FILE_CHANGED=true
break
fi
done
if [ "$IMPORTANT_FILE_CHANGED" = true ]; then
echo "should_run=true" >> $GITHUB_OUTPUT
else
echo "should_run=false" >> $GITHUB_OUTPUT
fi
build-and-deploy:
needs: check-file-changes
if: ${{ needs.check-file-changes.outputs.should_run == 'true' || github.event_name == 'workflow_dispatch' }}
runs-on: ubuntu-latest
permissions:
contents: read