Skip to content

deploy-prebuilt-app-to-netlify

skillLast commit

Deploys a verified local build artifact to Netlify without asking Netlify to rebuild the source project.

Role
Agent workflow design and automation engineering
Scope
Deployment, deterministic validation, and portable distribution
Status
Published npm package v0.1.0

Problem

Deploying an already-built application through a source-oriented hosting flow can trigger unnecessary rebuilds, publish the wrong directory, or upload unsafe local artifacts.

Constraints

  1. C1

    The requested artifact must be validated before any remote mutation.

  2. C2

    Secrets, source trees, caches, and unrelated files must never enter the deploy payload.

  3. C3

    Site selection, production promotion, and deployment are separate authorization boundaries.

Architecture

Local artifact and publish-directory preflight; Netlify CLI flow selection with explicit mutation gates; deployed URL and content verification.

01

Preflight

Validate the artifact tree, entry points, size, and excluded content.

02

Deployment

Choose the correct draft or production Netlify CLI path only after authorization.

03

Verification

Read back deployment state and confirm the delivered application at its public URL.

Decisions

D1

Deploy the artifact, not the repository

Keep prebuilt delivery separate from source builds and their dependency graph.

D2

Block unsafe trees before login

Run local safety checks before requesting credentials or mutating remote state.

D3

Verify the public result

Treat a successful CLI exit as incomplete until deployment state and served content are checked.

Contribution

  • Defined safe artifact-tree acceptance rules.
  • Implemented a deterministic preflight utility.
  • Separated draft, production, and site-selection authorization.
  • Added package and deployment-flow regression tests.

Outcomes

  • Agents can deploy a verified local build without asking Netlify to rebuild source.
  • Unsafe payloads fail before remote changes.
  • Authorization remains scoped to the requested deployment stage.
  • The final report distinguishes local validation, mutation, and public verification.

Verified stack

  • Agent Skills
  • JavaScript
  • Node.js
  • npm
  • Netlify CLI
  • GitHub Actions
  • CI/CD

Working through something similar?

Share your challenge, scope, and timeline to start a focused conversation.