Skip to content

Commit 6673d94

Browse files
authored
Update crawl.yml
1 parent 21b56a4 commit 6673d94

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

.github/workflows/crawl.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,17 @@ jobs:
2828
pip install -r requirements.txt
2929
3030
- name: Run web crawling script and check for changes
31-
id: crawl_step
32-
run: |
33-
python crawl.py
34-
continue-on-error: true
31+
run: python crawl.py
3532

36-
- name: Commit crawled files if there are changes
37-
if: success()
33+
- name: Commit crawled files
3834
run: |
39-
git config --global user.name "github-actions[bot]"
40-
git config --global user.email "github-actions[bot]@users.noreply.github.com"
41-
# Stage the entire directory for the commit
35+
git config user.name "github-actions[bot]"
36+
git config user.email "github-actions[bot]@users.noreply.github.com"
4237
git add crawled_output
43-
git commit -m "chore: Update crawled data" || echo "No changes to commit."
38+
# Check if there are changes to commit before committing
39+
if ! git diff-index --quiet HEAD --; then
40+
git commit -m "chore: Add crawled data"
41+
git push
42+
else
43+
echo "No changes to commit."
44+
fi

0 commit comments

Comments
 (0)