This guide documents the automated pipelines and workflows used to keep the Athena API up-to-date and deployed.
The core of Athena is its "Static Data" architecture. Data is not fetched from a database at runtime; it is compiled into the application during the build process.
We use a GitHub Action (.github/workflows/daily-update.yml) to keep data synchronized with the game.
data/*.json files.scripts/sync-version.ts.data/patches.json.2.10.0 -> 2.10.1).chore(data): update hero data.To manually trigger an update (e.g., right after a big patch):
The NPM package athena-api is published automatically when changes are merged to main.
Workflow: .github/workflows/publish.yml
main where package.json has changed.
npm run build-data to generate the TypeScript database.npm run build:lib to compile the library.NPM_TOKEN.The API and Documentation are hosted on Cloudflare Pages.
The production site is deployed automatically via Cloudflare's Git integration.
main.npm run build.output/publicFor ad-hoc deployments or testing, the deploy script can be used locally (requires authentication):
npm run deploy
This runs the build and uploads the output using wrangler pages deploy.
We aim to keep the API version in sync with the Overwatch 2 game version, but with our own patch cycles for fixes.
2.9 is Season 9).The scripts/sync-version.ts script handles this logic automatically:
data/patches.json.graph TD
A[Cron / Manual] -->|Trigger| B(Daily Update Workflow)
B --> C[Fetch External Data]
C --> D[Normalize & Save JSON]
D --> E[Sync Version]
E --> F{Changes?}
F -->|Yes| G[Create PR]
F -->|No| H[Stop]
G -->|Merge| I[Push to Main]
I --> J{Changed package.json?}
J -->|Yes| K(Publish Workflow)
K --> L[Publish to NPM]
I --> M(Cloudflare Pages)
M --> N[Deploy API & Docs]