Skip to main content
📬 Get weekly Production AI insightsPractical notes on Kubernetes, AI infrastructure and platform engineering. No spam.Subscribe free
Editorial cover for a CI/CD engineering guide
DevOps

GitHub Actions vs Vercel CI: Build Once, Deploy Once, Spend Less

Optimize GitHub Actions and Vercel with a shared compute budget, production-only deployments, prebuilt output, dependency caching and daily maintenance.

Luca Berton

· The Production AI Expert

Published ·7 min read

The cheapest build is the one you do not need to run. But the second-cheapest build depends on where you run it, what capacity is included in your plan, and whether the resulting artifact can be reused for production.

A recent investigation across a portfolio of websites exposed a familiar pattern: GitHub Actions built or tested a commit, Vercel built the same commit again, and multiple post-deployment checks repeated the same public-site audits. A shared compute allowance could be exhausted while routine operations were still scheduled to run. The solution was not a universal migration to one provider. It was an explicit division of responsibilities. This article omits project identities and private operational data. It complements my CI/CD optimization case study.

1. Model both providers as one delivery budget

As of November 2026, GitHub’s included usage documentation describes GitHub Free as including $12 of eligible monthly compute usage. At the documented standard Linux rate of $0.006 per minute, that is equivalent to 2,000 Linux minutes if nothing else draws on the allowance. Other eligible compute, runner types, storage and billing settings can change the result. Standard hosted runners in public repositories remain free for Actions execution; private repositories do not receive that exemption.

Vercel has also announced usage-based Standard build billing for existing Pro teams: $0.014 per build minute, with monthly usage credit applicable to builds. Check the effective billing configuration of your own team rather than assuming an older pricing model. See GitHub Actions billing and Vercel pricing for the current terms.

For a workload that takes five minutes on either platform, the illustrative marginal compute cost is $0.03 on a standard Linux Actions runner and $0.07 on a Vercel Standard build machine. This is not an invoice comparison. Included capacity, credit consumption, runner performance, packaging time and actual billed duration must be accounted for. A public-repository Actions build can have zero runner-minute charge but still incur hosting, artifact or transfer costs.

2. Choose exactly one build owner

WorkloadBuild ownerDeployment path
Public static site with compatible toolingGitHub ActionsVercel prebuilt upload
Private framework applicationVercel, if its total marginal cost is lowerGit integration on production branch
Private application with affordable available Actions capacityGitHub ActionsVercel prebuilt after validation
Public availability and metadata checksPublic monitoring repositoryNo deployment
Secret-dependent or privileged maintenanceAuthorized private environmentNo public execution by default

Do not make a private repository public to obtain free runners. Public monitoring can inspect public URLs; private source, environment variables, recovery archives and privileged credentials must stay within their existing trust boundary.

For the Vercel-owned approach, use Actions for targeted lint, type checking, unit tests and other release gates that do not require compiling the entire site twice. For the Actions-owned approach, build the deployable artifact once, validate it, and promote that same output. Keep a full build on the critical path whenever the release contract requires it.

3. Stop creating automatic preview deployments by default

When no test or reviewer needs a remote preview, configure the Vercel Git integration to deploy only the production branch:

{
  "git": {
    "deploymentEnabled": {
      "**": false,
      "main": true
    }
  }
}

Merge this property into the existing configuration rather than replacing headers, redirects, rewrites or application cron schedules. This example assumes that main is the production branch. Retain explicitly authorized previews where integration tests require an external URL. A local Playwright server can often satisfy browser tests without a Vercel preview. A scheduled production smoke test is appropriate only for read-only scenarios; it is not a substitute for pre-release validation.

An ignored build step is a separate mechanism. It can avoid compiling an unaffected application, but the deployment attempt may already have been created. Prefer preventing unnecessary deployments at the trigger level, and use an ignore script that defaults to building when the diff cannot be determined reliably. See Ignored Build Step guidance.

4. Keep push CI fast and predictable

An illustrative npm project can share one dependency installation across compatible checks:

name: Fast CI
on:
  pull_request:
    branches: [main]
  push:
    branches: [main]
permissions:
  contents: read
concurrency:
  group: ci-${{ github.ref }}
  cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
  validate:
    runs-on: ubuntu-24.04
    timeout-minutes: 10
    steps:
      - uses: actions/checkout@v4
        with:
          persist-credentials: false
      - uses: actions/setup-node@v4
        with:
          node-version: "24"
          cache: npm
      - run: npm ci
      - run: npm run lint
      - run: npm run typecheck
      - run: npm test

This is a pattern, not a complete release pipeline. Adapt scripts and required check names to the repository, update action versions to reviewed supported releases, and pin their full commit SHAs in production. The Ubuntu label is deliberately explicit; validate a newer runner image such as Ubuntu 26.04 on a representative workflow before migrating browser or native dependencies. Use a Node release compatible with the application and its dependencies.

The npm cache stores downloaded packages, not a trusted substitute for npm ci. For pnpm, configure its setup action and lockfile-aware store caching instead. Scope build and browser caches to runner OS, architecture, tool version and lockfile. Avoid restoring stale compiled output as a release artifact. Never cache credentials or private environment files.

Consolidation trades some parallelism for fewer runner starts and dependency installations. If lint and typecheck are required independent checks, first verify the branch protection and deployment gates before combining them. Never make a required check disappear by applying a broad workflow path filter.

5. Deploy prebuilt output from Actions

The Vercel CLI build documentation describes building locally and deploying the generated output. If Actions owns the build, disable automatic Git deployments with "deploymentEnabled": false inside the existing git object. Run the following in a trusted production job, after the applicable release gates, with a reviewed Vercel CLI version installed from the lockfile:

npx --no-install vercel pull --yes --environment=production --token="$VERCEL_TOKEN"
npx --no-install vercel build --prod --token="$VERCEL_TOKEN"
# Validate .vercel/output according to the application release contract.
npx --no-install vercel deploy --prebuilt --prod --token="$VERCEL_TOKEN"

Provide project identifiers and deployment credentials through protected CI configuration. Do not expose production secrets to untrusted pull request code. The Vercel build command is itself the application build, not a packaging-only step by default; do not run a separate framework build first unless a tested adapter deliberately reuses that output. Confirm the runtime, redirects, functions and framework adapter are supported by the prebuilt path. After migration, verify the deployed commit and production alias before declaring success.

6. Centralize public maintenance once a day

Move repeated SEO, Open Graph, Lighthouse and availability audits into a single daily controller. Public-site checks can run on standard hosted runners in a public repository without using the private Actions compute allowance. Keep the configuration limited to public URLs, run with read-only permissions where possible, and enforce request timeouts and bounded sampling.

name: Daily public website maintenance
on:
  schedule:
    - cron: "41 6 * * *"
permissions:
  contents: read
concurrency:
  group: daily-public-maintenance
  cancel-in-progress: false
jobs:
  audit:
    runs-on: ubuntu-24.04
    timeout-minutes: 15
    steps:
      - uses: actions/checkout@v4
        with:
          persist-credentials: false
      - run: bash scripts/check-public-endpoints.sh

The example assumes the reviewed audit script already exists. GitHub schedules use UTC by default and can be delayed; stagger workloads away from the top of the hour. Keep time-sensitive publishing and recovery operations on their own appropriate schedules. Daily maintenance should not erase fast release checks. Validate the new controller before removing the former monitoring jobs, and retain alerts for genuine regressions.

7. Put numbers on the monthly plan

Consider an illustrative portfolio with a 2,000-standard-Linux-minute equivalent allowance. Reserve capacity for essential work first, then assign an operational target below the ceiling.

Monthly allocationStandard Linux minutes
Private pre-release CI900
Private scheduled maintenance350
Essential operations and recovery250
Unallocated reserve500
Total2,000

For six private repositories, four two-minute checks every day would consume 1,440 minutes in a 30-day month. One two-minute check per repository per day would consume 360 minutes, a reduction of 1,080 minutes or 75% for that specific workload. Moving eligible public checks to the public controller could reduce private runner usage further. These figures assume the same duration, no other jobs and standard Linux runners; they are modeled, not measured savings.

Likewise, avoiding 100 unnecessary five-minute Vercel builds removes 500 build minutes, equivalent to $7 at the stated Standard rate before credits and other billing effects. The key is to avoid work first, then compare providers for the work that remains.

8. Measure the whole system, not just builds

Collect job execution time rounded according to billing rules, private and public runner usage separately, cache hit ratios, deployment targets, billed build minutes, and the amount of work canceled before execution. Use GitHub job execution time and the provider usage exports rather than multiplying every failed run by an average successful build duration.

Track production availability, successful releases and failed recovery or maintenance jobs alongside the costs. A deployment marked ready does not establish that every test ran; a job rejected before it starts is not a test failure in the application. Keep the merge blocked when evidence is missing rather than converting the absence of evidence into success.

Vercel hosting charges also include runtime compute, requests, data transfer and cache-related usage. Prebuilt deployment changes build ownership, not the behavior of the deployed application. Compare matched billing periods, traffic volume and release counts before attributing changes in total spend to CI. Audit cache headers separately, and never cache personalized or authenticated responses as public content.

The outcome of this investigation is a design principle: one owner for each build, one intentional production release path, lightweight pre-release gates, and a scheduled public controller for work that does not need private access. Actual savings still need to be verified against subsequent billing periods. An efficient pipeline is one that preserves the evidence needed to release safely while spending compute only on work that matters.

Free 30-min Production AI consultation

Book Now