deploy-gameweek

harryfliu's avatarfrom harryfliu

Deploys verified gameweek data to staging and production. Use ONLY after the user has verified the data locally using fetch-gameweek skill.

⭐0stars🔀0forks📁View on GitHub🕐Updated Jan 8, 2026

When & Why to Use This Skill

The deploy-gameweek skill automates the deployment of verified gameweek data to GitHub Pages, streamlining the transition from local development to live environments. It manages a professional CI/CD workflow by executing build scripts, handling Git version control, and enforcing a 'staging-first' safety protocol to ensure data integrity before production release.

Use Cases

  • case 1: Automating the update of Fantasy Premier League (FPL) data, league standings, and social preview images on a live website.
  • case 2: Managing a safe deployment pipeline that requires mandatory staging verification before pushing changes to the production branch.
  • case 3: Streamlining repetitive Git operations such as committing build assets and pushing to multiple remote branches with a single command.
namedeploy-gameweek
descriptionDeploys verified gameweek data to staging and production. Use ONLY after the user has verified the data locally using fetch-gameweek skill.
allowed-toolsBash(python3:*), Bash(git:*), Read

FPL Gameweek Deployer

Deploys verified gameweek data to staging and production GitHub Pages.

⚠️ IMPORTANT

This skill should ONLY be used AFTER:

  1. Running fetch-gameweek skill
  2. Verifying data locally at http://localhost:8000
  3. User confirms everything looks good

Workflow

This is Step 2 of the two-step workflow:

  1. fetch-gameweek skill: Fetch data → Serve locally → Verify
  2. This skill: Deploy to staging/production

What This Skill Does

  1. Runs deploy-github-clean.py to regenerate docs and build
  2. Commits changes to git with a descriptive message
  3. Pushes to staging branch first
  4. Asks user if they want to push to main (production)
  5. If approved, pushes to main branch

Usage

User: "Deploy gameweek 18"

I will:

  • Deploy to staging automatically
  • Ask before pushing to production

Commands I Execute

Deploy to Staging

python3 deploy-github-clean.py
git add .
git commit -m "Add GW18 data"
git push origin staging

Deploy to Production (After User Approval)

git push origin main

Deployment Process

Step 1: Run Deployment Script

deploy-github-clean.py does:

  • Converts CSVs to JSON
  • Generates league table
  • Creates social preview images
  • Updates standings
  • Builds docs folder

Step 2: Git Commit

  • Adds all changes
  • Creates commit with message: "Add GW{X} data"
  • Includes timestamp

Step 3: Push to Staging

  • Pushes to staging branch
  • GitHub Pages deploys automatically
  • User can verify at staging URL

Step 4: Push to Production (With Confirmation)

  • Asks user: "Push to production?"
  • If yes: Pushes to main branch
  • If no: Stops here (can push manually later)

Safety Features

  1. Staging first: Always deploys to staging before production
  2. User confirmation: Requires explicit approval before production push
  3. Git safety: No force pushes, no destructive operations
  4. Rollback available: User can revert commits if needed

What Gets Deployed

All files in the gameweek directory:

  • CSV files (match results, transfers, players, fixtures)
  • Summary files (summary_gwX.csv, ai_summary_gwX.md)
  • Static files (fixture_list.csv, starting_draft.csv, draftdata25_26.xlsx)
  • Generated docs (JSON, images, HTML)

After Deployment

  • Staging: https://[your-staging-url].github.io
  • Production: https://[your-production-url].github.io

GitHub Pages will automatically rebuild within 1-2 minutes.

Troubleshooting

Merge Conflicts

If you get merge conflicts:

git pull origin staging --rebase
# Resolve conflicts
git push origin staging

Need to Rollback

git revert HEAD
git push origin staging
git push origin main

Manual Push (Skip This Skill)

git push origin staging
git push origin main

Important Notes

  • Always verify locally first using fetch-gameweek skill
  • Staging is automatic, production requires confirmation
  • No force pushes - safe git operations only
  • Bearer token doesn't affect deployment - only needed for fetching data