Files
gateway-gamers.net/.gitlab-ci.yml
T
mandaloreandClaude Sonnet 4.6 c4e355dd63 feat: add ELO refresh job to GitLab CI and polish mobile display
- Add refresh-elo job to .gitlab-ci.yml triggered by schedules; runs
  the Python scraper and commits updated elo-data.json back to main
- Hide Stat-Check ELO column header on mobile (sm:hidden), fold ELO
  score as a subtitle under ITC Points on mobile instead

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-29 00:07:41 -05:00

46 lines
1012 B
YAML

stages:
- build
- deploy
- refresh
build:
stage: build
script:
- npm ci
- npm run build
artifacts:
paths:
- dist/
expire_in: 1 hour
only:
- main
deploy:
stage: deploy
script:
- rsync -avz --delete dist/ /var/www/domains/gateway-gamers.net/40k-rankings/
only:
- main
environment:
name: production
url: https://40k-rankings.gateway-gamers.net
refresh-elo:
stage: refresh
image: python:3.12-slim
variables:
GIT_STRATEGY: clone
script:
- cd statcheck-elo-scraper && python refresh_elo.py && cd ..
- git config user.email "gitlab-ci@gateway-gamers.net"
- git config user.name "GitLab CI"
- git remote set-url origin "https://oauth2:${GITLAB_ACCESS_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git"
- git add public/elo-data.json
- |
if ! git diff --cached --quiet; then
git commit -m "data: refresh stat-check ELO rankings [skip ci]"
git push origin HEAD:main
fi
only:
- schedules