Structure supports static websites natively, and makes it easy to deploy a production-ready static site in seconds.
OverviewWhen you deploy a project folder that contains an `index.html` file in the root folder, Structure will consider it a static website. The syntax to deploy a static website is `structure deploy my-site`.
If Structure does not automtically detect your project as a static site, you can include the project type with: `structure deploy --app my-site --type static`.
After you run the `deploy` command, Structure will handle generating SSL certificates, setting up domains and URLs, and hosting the site with high availability.
Note: Structure has a max project size of 25MB. If your static website contains large assets (ex. high-resolution photos, videos, etc.) that don't change often, we recommend hosting the large assets externally on a separate service or CDN, such as AWS S3. Then, your site may link to the external asset URL.
Creating a Hello World siteStructure has a command-line interface (CLI) that makes it easy to deploy projects. First, click here to set up the CLI on your computer. Once you've installed the CLI and logged in via `structure login`, you'll be ready to deploy!
Let's create a simple static website. On your local computer, create a folder called `hello-world`, and create an `index.html` file in it. Add some content, too:
echo '<h1>This is a great website!</h1>' > index.html
Now, we can deploy this project by running:
structure deploy --app hello-world --type static
Here, we told Structure to deploy this project folder to the `hello-world` app. Structure created the hello-world app on the fly, because it didn't exist before.
To see the status of the new deployment, and its URL, run:
Great! Your website is up and running! It's load-balanced, secured with SSL, gathering logs, and being monitored by Structure – all automatically.
Now, feel free to make some more changes on your own, and re-deploy with the same command as above!