Files
gateway-gamers.net/.gitlab-ci.yml
T
mandaloreandClaude Sonnet 4.6 780ca22be5 fix: install pip deps in CI with --break-system-packages
Python 3.12 (PEP 668) blocks bare pip installs into the system.
Move the install step into the CI script and drop the self-install
fallback from the Python script.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-26 21:01:51 -05:00

56 lines
1.5 KiB
YAML

stages:
- sync
- build
- deploy
# Runs only on scheduled pipelines (every Wednesday via GitLab schedule).
# Downloads the stat-check.com ELO Excel sheet, writes public/elo-data.json,
# then commits and pushes so a normal build+deploy pipeline picks it up.
# Requires CI variable: GITLAB_PUSH_TOKEN (project token, write_repository scope)
sync-elo:
stage: sync
only:
- schedules
script:
- pip3 install --break-system-packages requests openpyxl -q
- 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 add public/elo-data.json
- |
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.
build:
stage: build
script:
- npm ci
- npm run build
artifacts:
paths:
- dist/
expire_in: 1 hour
only:
- main
except:
- schedules
deploy:
stage: deploy
script:
- rsync -avz --delete dist/ /var/www/domains/gateway-gamers.net/40k-rankings/
only:
- main
except:
- schedules
environment:
name: production
url: https://40k-rankings.gateway-gamers.net