Skip to Content
Documentation
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 Git 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 Node.js for a frontend build, or Plain HTML/CSS/JS for files already ready to serve.

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
Publish directorydist

The publish directory is relative to the configured root and must contain index.html. Plain HTML/CSS/JS uses . for files at the root and needs no build or start command. Keep the static server container port shown by the form.

Enable Single-page app routing if browser routes should return index.html. Missing assets still return 404. For a server-rendered site that needs an application process, choose Web service instead.

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 application 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 source, resource and runtime saves start a new deployment; a description-only save does not.

Last updated on