October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk4 min

Building FoxyInvoice, Chapter 7: CI/CD—Push to Main and It’s Live

FoxyInvoice’s push-to-deploy pipeline runs checks before production, serializes deployment and verifies the result—yet a green workflow once left stale code live.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

In the FoxyInvoice deployment setup described by Lith SEO, a push to main can reach production without a manual release step—but a green workflow alone does not prove the intended code is live. The pipeline runs tests, repository and secret checks, serializes deployment, then checks container health and the served application. Its most important lesson comes from a failure: a workflow once reported success while stale containers kept running.

What happens after a push to main?

For FoxyInvoice, main is production; the author says the project does not maintain a staging environment. The sequence described in Lith SEO’s Chapter 7 is:

As an Amazon Associate I earn from qualifying purchases.

  1. Push: a change to the production branch starts the workflow.
  2. Parallel gates: tests, repository-conformance checks and Gitleaks secret scanning run before deployment. Tests include unit tests and Testcontainers-backed integration tests against temporary Postgres, including tenant-isolation coverage. The conformance check blocks newly introduced violations while allowing existing baseline debt.
  3. Serialized deployment: after the gates pass, the workflow connects to the host over SSH. It resets the host repository to the intended revision before rebuilding, avoiding a build from a repository left mid-update by a manual operation.
  4. Build and container checks: the private feed token is passed to the image build as a BuildKit secret, rather than baked into an image layer or build history. The deployment waits for each API container to become healthy; EF Core migrations are applied at container startup.
  5. Frontend and live checks: the SPA is rebuilt on the host and its output swapped into Caddy’s directory. The workflow checks both /healthz endpoints and runs a smoke test.
  6. Notification: after those checks, the workflow pings IndexNow.

These are implementation details reported by the chapter, not an independent audit of the live service. The practical distinction is that deployment is not considered verified merely because a build or SSH command completed: the workflow also checks health and the application after the change.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Why deploy directly to production?

The author’s setup treats main as production and has no staging environment. Lith SEO’s argument is that a staging system that is not actively maintained can drift from production and become an obstacle rather than a useful safety net. That is a tradeoff for this solo-operated project, not a general recommendation. A team should weigh the cost of keeping staging representative against the consequences of a production defect, its ability to test safely, and the release risk of its application.

GitHub Actions supports workflows triggered by pushes to a default branch, along with deployment controls such as concurrency and environments that can require approval or restrict branches. GitHub also documents limits on secret access and OIDC authentication for supported cloud providers. These are platform options; the FoxyInvoice account does not establish that its pipeline uses every one of them. See GitHub’s continuous deployment documentation.

Three ways a green workflow can mislead

The chapter’s incidents are specific to the author’s system, not evidence of universal failure rates. They show why job state, runner activity and the deployed application matter alongside the workflow’s final color.

1. A failed build can leave old code serving

A build step used || echo after an error, and deployment continued with up -d --no-build. When a missing token made the build fail, the old containers remained active and the workflow appeared successful for eight hours. The corrective rule is straightforward: a failed build must stop deployment. Do not turn a build error into a successful step and then start containers without rebuilding.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

2. A concurrency lock can leave a run pending

The author describes a cancelled run that failed to release its concurrency group, leaving later runs with zero jobs while they waited. In that incident, zero jobs combined with idle runners pointed to a stuck lock rather than ordinary runner queueing. Checking both the run’s job state and runner activity helps distinguish those conditions.

3. Incorrect runner labels can match no runner

A quoted string was interpreted as one literal label instead of a list of labels, so none of the self-hosted runners matched. The correction was to express the labels as a YAML list. When a job does not get assigned, inspect the labels the workflow actually requests and compare them with the labels on available runners.

Runner choice affects queueing and maintenance

FoxyInvoice’s runners are self-hosted and shared with sibling repositories. The chapter says the organization chose them after GitHub-included minutes were exhausted under a $0 spending limit, and that normal queueing is monitored. This describes that organization’s arrangement, not a GitHub-wide requirement or pricing rule. Self-hosting can change the cost and control tradeoff, but it also makes runner availability, maintenance and queue behavior part of the operator’s responsibility.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

How rollback interacts with database migrations

The described application is built on the host, so rollback does not depend on retrieving an old image from a registry: the author resets the host repository to a previous SHA and redeploys. That does not mean a database can safely be rolled back with the code. Lith SEO warns that an applied migration should not be assumed to undo itself and describes fixing forward as the operating doctrine.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The chapter also recounts two production schema edits made outside the migration process; later migrations collided with those edits and caused startup crash loops. Its guidance is to avoid out-of-band schema changes. If an emergency manual change cannot be avoided, follow it with an idempotent migration and reconcile the migration history table. These are lessons from this project’s experience, not a guarantee that every migration system behaves identically.

Best Value
Sale
Game Programming Patterns
  • Brand New in box. The product ships with all relevant accessories

What makes push-to-deploy dependable?

For this pipeline, dependable deployment depends on preserving the chain from tested revision to verified production state. The useful checks are operational, not just cosmetic:

  • Run meaningful tests, repository checks and secret scanning before production deployment.
  • Ensure any failed build stops the deployment rather than allowing old containers to continue unnoticed.
  • Serialize production deployments so pushes do not interleave.
  • Keep build credentials out of image layers and history.
  • Check container health and the live application after deployment; workflow completion by itself does not establish that the expected version is serving.
  • Make runner labels and queue state observable, and treat database migrations as a separate rollback concern from application code.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.