BK cloud / systems Notes
EN
English ENDeutsch DEEspañol ES中文 ZHFrançais FRPortuguês (Brasil) PT-BR日本語 JAहिन्दी HINederlands NL
Let’s connect ↗
← Back to field notes

Codex credits exhausted? How I kept developing my website with ChatGPT and GitHub

When Codex reached its limit

I build berndkuhlen.de with AI. But my ChatGPT Plus subscription does not give me unlimited Codex sessions: when the coding allowance ran out, I could either wait for a reset or buy additional credits. I still had small website changes to make, so I tried a different workflow.

Connect the existing repository

My site already lives in a private GitHub repository and runs on AWS S3 and CloudFront. First I made sure my MacBook project was committed and pushed to GitHub. In ChatGPT I opened Settings → Plugins → GitHub, authorized access and selected only the repository I wanted to work on. This is permissioned repository access, not a live sync of my MacBook files.

ChatGPT → branch → pull request

I asked ChatGPT to inspect the repository, locate the relevant files and suggest a narrowly scoped change. In the GitHub-enabled environment available to me, ChatGPT could create a branch, commit changes and open a pull request. I reviewed the diff and GitHub Actions checks before merging. We actually used this flow for security fixes and a dated treadmill note in nine languages.

Check locally; publish deliberately

For a local preview I fetch the PR branch, switch to it and run python3 -m http.server 8000. After merging, git switch main and git pull --ff-only origin main synchronize my MacBook. Initially deployment was a separate manual step; now a reviewed merge to main starts the secured GitHub Actions workflow automatically. CloudFront invalidations remain forbidden, so visitors see new files after the normal 60-minute cache TTL. There's a $15 lesson behind that rule: in a weak moment, I paid out of my own pocket to invalidate a lot of pages. My updates aren't time-critical, so I ban invalidations globally and simply let cached objects expire. Lesson learned. ;)

The catch

This did not magically unlock Codex or create unlimited free agent work. ChatGPT, plugins and other agent features have their own availability and usage limits, and GitHub write actions are not supported in every ChatGPT experience. For me, however, ordinary chat plus the available GitHub operations was enough to keep making small, reviewed changes without purchasing extra Codex credits.

Note: This account documents my workflow on 5 November 2026. Codex usage documentation · GitHub connection documentation

How I configured GitHub Actions with AWS OIDC

Configuration in five steps:

  1. I reused the existing AWS IAM OIDC provider for token.actions.githubusercontent.com with audience sts.amazonaws.com and created the CloudFormation stack berndkuhlen-github-frontend.
  2. The role berndkuhlen-github-frontend trusts only my immutable GitHub owner/repository IDs and refs/heads/main. Its policy permits only allowlisted public S3 files plus read-only cache-policy checks—no deletion, IAM administration or CloudFront invalidation.
  3. Before enabling S3 writes I extended the existing AgentMonthlySafetyStop ($30/month) automatic deny to the new role. The release script also performs a fresh budget read and estimates costs before writing. Budget data is delayed, not a guaranteed real-time cap.
  4. I configured .github/workflows/oidc-frontend-release.yml with short-lived credentials via aws-actions/configure-aws-credentials, offline tests, a verified merged-PR check, changed-file allowlist, SHA-256 manifest, conditional S3 uploads and read-back verification.
  5. After a manual bootstrap and a reviewed retry, I enabled the repository variable OIDC_FRONTEND_AUTODEPLOY_ENABLED=true. Now merges to main trigger the same checks automatically; deployment receipts track the last successful release.

On 5 November 2026, GitHub Actions used OIDC to assume a temporary AWS role scoped to this repository and main. The first release uploaded and verified 422 allowlisted objects at the S3 origin; its estimated AWS cost was US$0.03755. The first attempt stopped before writing because ten live objects differed from the old baseline. I reviewed their exact hashes, then retried while keeping the failed deployment record in the ledger. No objects were deleted and no CloudFront invalidations were sent.

Every merge to main now starts this workflow. It verifies that HEAD is a real merged pull request, runs the full offline site checks, checks the existing $30 monthly budget stop and validates all origins before conditional writes. Budget reporting can be delayed, so the stop is not a hard invoice cap. GitHub's current private-repository plan does not provide server-side branch protection; the workflow's PR check is a gate in the workflow, not an enforced repository rule. I chose to keep the repository private.