diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7016472..1d95216 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -13,11 +13,17 @@ sync-elo: - schedules script: - python3 scripts/sync-elo.py - - git config user.email "ci@gateway-gamers.net" - - git config user.name "GG CI Bot" - - git remote set-url origin "https://oauth2:${GITLAB_PUSH_TOKEN}@gl.mando.club/mandalore/40k-rankings.gateway-gamers.net.git" + - git config user.email ci@gateway-gamers.net + - 'git config user.name "GG CI Bot"' + - 'git remote set-url origin "https://oauth2:${GITLAB_PUSH_TOKEN}@gl.mando.club/mandalore/40k-rankings.gateway-gamers.net.git"' - git add public/elo-data.json - - git diff --staged --quiet && echo "No ELO changes." || (git commit -m "sync: update ELO data" && git push origin HEAD:main) + - | + if git diff --staged --quiet; then + echo "No ELO changes, skipping commit." + else + git commit -m 'sync: update ELO data' + git push origin HEAD:main + fi # Build and deploy skip on scheduled pipelines — the robot push above # triggers its own normal pipeline that handles the actual build + deploy.