File tree Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -28,16 +28,17 @@ jobs:
28
28
pip install -r requirements.txt
29
29
30
30
- 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
35
32
36
- - name : Commit crawled files if there are changes
37
- if : success()
33
+ - name : Commit crawled files
38
34
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"
42
37
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
You can’t perform that action at this time.
0 commit comments