Refactor GitHub Actions workflow
All checks were successful
Run Scraper / scrape (push) Successful in 22s
All checks were successful
Run Scraper / scrape (push) Successful in 22s
This commit is contained in:
@ -38,15 +38,23 @@ jobs:
|
||||
- name: Run script
|
||||
run: uv run python scrape.py
|
||||
|
||||
- name: Pull latest changes before staging
|
||||
- name: Stage any changes from scraper
|
||||
run: |
|
||||
git add -A
|
||||
|
||||
- name: Pull latest changes with rebase
|
||||
run: |
|
||||
git config user.name "Joakim Hellsén"
|
||||
git config user.email "tlovinator@gmail.com"
|
||||
git pull --rebase https://${{ secrets.REPO_WRITE_PAT }}@git.lovinator.space/TheLovinator/wutheringwaves.git master
|
||||
|
||||
- name: Stage updated/deleted files
|
||||
run: |
|
||||
git add -u
|
||||
# If there are staged changes, commit them temporarily
|
||||
if ! git diff --cached --quiet; then
|
||||
git commit -m "Temporary commit for rebase"
|
||||
git pull --rebase https://${{ secrets.REPO_WRITE_PAT }}@git.lovinator.space/TheLovinator/wutheringwaves.git master
|
||||
# Reset to unstage the temporary commit but keep the changes
|
||||
git reset --soft HEAD~1
|
||||
else
|
||||
git pull --rebase https://${{ secrets.REPO_WRITE_PAT }}@git.lovinator.space/TheLovinator/wutheringwaves.git master
|
||||
fi
|
||||
|
||||
- name: Get the files that will be committed
|
||||
id: get_modified_files
|
||||
|
Reference in New Issue
Block a user