Saltearse al contenido

Deploy a GitHub web landing

Use this guide when an AI coding agent has generated a static landing page and you want to publish it from GitHub with Sureva Cloud. The goal is simple: a real production URL backed by the repository you own.

  1. Put the landing in GitHub.
  2. Confirm it builds locally with pnpm.
  3. Create a Sureva web app connected to that repository.
  4. Trigger the first deploy.
  5. Wait for the first successful deploy to activate and materialize the live DNS/CDN infrastructure.

You need:

  • A GitHub repository for the landing page.
  • A static build output directory such as dist, build, or out.
  • A Sureva Cloud project where you can create apps and deploy them.
  • A build command that works without manual steps.

For pnpm projects, the common local check is:

Terminal window
pnpm install
pnpm build

If your landing uses Astro, Vite, Next static export, or another static frontend tool, the important thing is the final output directory. Sureva syncs that output to S3 during deploy.

Ask your coding agent for the right project shape

Section titled “Ask your coding agent for the right project shape”

Give your agent the docs link and the expected deployment contract. For example:

Create a production-ready static landing page for my business.
Use pnpm commands. The app will be deployed as a Sureva Cloud web app from GitHub.
Make sure `pnpm build` produces static files in `dist`.
Do not expect live DNS/CDN infrastructure before the first successful deploy.

Use the CLI to create the app. The --type web flag selects the static landing configuration:

Terminal window
sureva apps create \
--org <org-slug> \
--name my-landing \
--type web \
--region us-east-2

App creation stores configuration only. It records the app, region, generated subdomain, and production environment. It does not mean the landing is already live on DNS/CDN.

Connect the GitHub repository and branch through the Sureva Cloud web dashboard after creation, or follow the full CLI lifecycle guide for the complete agent-driven flow.

After the app exists, trigger a deployment with the CLI:

Terminal window
sureva deploys trigger <app-id> --org <org-slug>

Add --wait to block until the deploy reaches a terminal state:

Terminal window
sureva deploys trigger <app-id> --org <org-slug> --wait

For a web app, a release tag is not required. The deployment uses the GitHub branch, build command, and output directory configured in the dashboard.

During the build, Sureva clones the repository, checks out the ref, runs your build command, and syncs the output directory to the regional S3 bucket.

What happens on the first successful deploy

Section titled “What happens on the first successful deploy”

The first successful deploy is the activation point. After the build succeeds, Sureva activates and materializes the live DNS/CDN infrastructure:

  • Creates or records the CloudFront tenant for the web app.
  • Creates the Route53 CNAME for the app subdomain.
  • Enables the tenant when the app is public.
  • Invalidates the CDN cache so visitors receive the new files.

That is why a web app can exist in the dashboard before the public URL is ready. The app has configuration first; the live delivery path appears after the first successful deploy.

After the first success, later deploys rebuild the project, sync the output to S3, and invalidate the CDN cache. They do not recreate the live DNS/CDN infrastructure each time.

Check the deploy status and failure detail with the CLI:

Terminal window
sureva deploys list <app-id> --org <org-slug>
sureva deploys status <app-id> <deploy-id> --org <org-slug>

Most first-deploy failures are caused by user project configuration: missing dependencies, a build command that fails, or a wrong output directory. Run the same commands locally before retrying:

Terminal window
pnpm install
pnpm build
ls dist
  • Your GitHub repo contains the landing source and lockfile.
  • pnpm build succeeds locally.
  • The app type is web.
  • The build output directory matches the project.
  • The first successful deploy has completed.
  • The public subdomain works after DNS/CDN activation.