Docs
Automation and CI/CD
Workflows, cron jobs, and release automation.
Automate the boring parts
CI/CD keeps releases, metrics, and syndication predictable. Each workflow is isolated,
documented, and safe to re-run without damaging the main deployment.
GitHub Actions
Semantic Release
Cron
Idempotent
Workflow matrix
| Workflow | Trigger | Output |
|---|---|---|
.github/workflows/release.yml |
Push to main |
Semantic release tag + GitHub release notes. |
.github/workflows/github-metrics.yml |
Cron (daily) + manual dispatch | Refreshes GitHub metrics history and commits updates. |
.github/workflows/syndicate.yml |
Posts/config changes + manual dispatch | Syndicates posts and opens a PR for state updates. |
vercel.json |
Vercel cron schedule | Calls /api/github-metrics-update for redundancy. |
/api/project-details-refresh |
GitHub Actions or manual webhook | Forces a project detail refresh for a specific repo. |
Release pipeline
-
01. Conventional commits
-
02. GitHub Actions run
-
03. Release notes
Metrics refresh pipeline
scripts/updateGithubMetrics.jspowers the refresh logic..github/workflows/github-metrics.ymlruns nightly and on demand.- The workflow uses a metrics store adapter (Postgres in production, SQLite locally).
- Vercel cron calls
/api/github-metrics-updateas a redundant trigger. - Project detail refreshes can call
/api/project-details-refresh?repo=OWNER/REPO. scripts/ensureGithubMetrics.jsruns beforenpm run devto warm the snapshot when missing.scripts/updateNugetPackages.jsuses the NuGet search API plusdata/projects.ts,data/projects.generated.ts, and the GitHub repo list to map packages to projects, writingdata/nuget-packages.json.scripts/updateProjectRepos.jssyncs all owned GitHub repos intodata/projects.generated.ts.scripts/ensureBuildData.jsruns beforenpm run buildto refresh generated data older than 24 hours.
Syndication pipeline
- Posts are cross-posted after merges to
mainor manual dispatch. - The workflow creates a PR for
.syndication-state.jsonupdates. - Errors do not block deployments (
continue-on-erroris enabled). - Full configuration details live in Syndication.
Local runbook
| Command | Use case |
|---|---|
npm run metrics:update |
Refresh GitHub metrics history locally. |
npm run syndicate:dry-run |
Preview syndication without publishing. |
npm run syndicate -- --post=slug |
Publish a single post. |
npm run nuget:update |
Regenerate NuGet package mappings from the NuGet profile. |
npm run projects:update |
Sync owned GitHub repos into data/projects.generated.ts. |
Optional environment
| Variable | Use case |
|---|---|
NUGET_PROFILE |
Overrides the NuGet profile name used by the NuGet mapping script (defaults to JerrettDavis). |
NUGET_PROFILE_URL |
Full profile URL to scrape (useful if the profile slug differs). |
Required secrets
GITHUB_TOKEN
HASHNODE_API_TOKEN
DEVTO_API_KEY
DATABASE_URL
METRICS_UPDATE_SECRET
PROJECT_DETAIL_REFRESH_SECRET