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
|
- name: Run script
|
||||||
run: uv run python scrape.py
|
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: |
|
run: |
|
||||||
git config user.name "Joakim Hellsén"
|
git config user.name "Joakim Hellsén"
|
||||||
git config user.email "tlovinator@gmail.com"
|
git config user.email "tlovinator@gmail.com"
|
||||||
git pull --rebase https://${{ secrets.REPO_WRITE_PAT }}@git.lovinator.space/TheLovinator/wutheringwaves.git master
|
# If there are staged changes, commit them temporarily
|
||||||
|
if ! git diff --cached --quiet; then
|
||||||
- name: Stage updated/deleted files
|
git commit -m "Temporary commit for rebase"
|
||||||
run: |
|
git pull --rebase https://${{ secrets.REPO_WRITE_PAT }}@git.lovinator.space/TheLovinator/wutheringwaves.git master
|
||||||
git add -u
|
# 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
|
- name: Get the files that will be committed
|
||||||
id: get_modified_files
|
id: get_modified_files
|
||||||
|
Reference in New Issue
Block a user