Skip to Content
We are conducting a survey to learn how startups, SMEs, developers, and technical teams currently host, deploy, and operate software. Take the survey
Infralane
Infralane
TutorialsDeploy a static site

Tutorial: deploy a static site

This tutorial deploys a frontend that compiles into static files. You need to know the repository’s build command and the directory created by that build.

Find the output directory first

Run the application’s normal build in your development or continuous-integration workflow. Identify the folder containing the final HTML, CSS, JavaScript, and assets. Common names include dist and build, but your project can differ.

Create the application

Open Applications → Deploy application. Enter a permanent name and choose GitHub Repository.

Select source and directory

Choose the repository and branch. Use / when the site is at repository root. For a monorepo, enter the site directory, such as /apps/site.

Choose Static Site

In Type & build, select Static Site and the language runtime used by the build.

Enter build settings

Enter the project’s build command and output directory. For a sample project these might be:

FieldSample value
Build commandnpm run build
Output directorydist

The output directory is relative to the configured root directory. The current deployment form also requires a valid port value for a static-site application; keep the value shown by the form unless your project instructions require another supported value.

Choose capacity

Select an active pool plus CPU and memory. Build-time needs can be different from the resources required to serve the finished site, so use a value that lets the build complete reliably.

Deploy

Review the root directory and output directory together. Select Deploy app and watch the deployment.

Verify files and routes

Open the public endpoint. Test the home page, a nested route, and one static asset. Check browser-visible errors and application logs where applicable.

A successful build with a missing site usually points to the wrong output directory or root directory. Verify the folder produced by the build before changing resources.

Update the site

Make source changes through your normal reviewed Git workflow. When changing dashboard settings, remember that saving a settings section starts a new deployment.

Last updated on