In this article, I’ll walk you through how to easily and automatically deploy a static website to your server using Launchdeck and Git.

Static sites are great. They are easy and quick to create, they load super quickly, are secure and cheap to host. Unlike dynamic websites, they do not use a separate server-side programming language, framework or a database. Static websites consist of HTML, CSS and Javascript and each version has fixed content. The result of this is that every change in the content has to be uploaded to the server to make it visible to the visitor. This process should preferably be automated and easy to set up. Launchdeck can help with this.

Launchdeck is an automated deployment tool that allows you to easily deploy code from your Git repository to your server.

Using a static site generator

Static site generators (SSG) are a great way to build websites and export them to static html pages that can be readily uploaded to your server. There’s a large variety of static site generators, based on different programming languages and technologies, and each offers different tools to style your website, create content and update pages.

We have created some specific deployment guides for the most commonly used static site generators. If you are using one of these tools, or a similar static site generator, read on to one of the deployment guides below.

Before we get started 

When you first start using Launchdeck to deploy static websites, it’s important that you’re already using Git, and have access to a server that you wish to deploy code to. If you’re not already using Git, do yourself a favor and look into it! Git’s main website has some great resources to get you started.

We offer a free full-featured plan that allows you to deploy one project as often as you’d like!

Create a project

Once you've signed up for a new Launchdeck account, you can create your first project and link it to your Git account. You can easily connect a Github or Bitbucket account and choose from the list of repositories available within the account. Or if you're using a different Git provider, like Gitlab or a self-hosted server, you can choose the Private/Hosted Git server option.

Deploy from Git

Configure build commands (optional)

The next step allows us to define commands which will be executed in an isolated docker container - this is the build step. You can use this step to, for example, compile assets, install dependencies, run tests, and everything in between.

If you only use static HTML pages, you can skip this step. When using a static site generator, the static HTML pages must first be built before they can be uploaded to the server.

Configure a server

All files from your repository can now be uploaded to the server.

Hit ‘+ new server’, select the protocol, and enter the credentials facilitating access to your server.

All the ins and outs on how to set up a server can be found below in our server setup docs;

Deploy for the first time

You’re now ready to start your first deployment. Click ‘create new project’ to confirm the settings and add the project. In the project overview, you can now start the build. The code will be cloned from your repository and prepared for you to publish it. Hit ‘Publish’ and your static website is live!

If you then commit changes to your repository, the commit will automatically appear in your project overview where you’ll be able to upload and publish your new version with the push of a button. If anything goes wrong, you can simply roll back to the latest working version.

That’s all! By using Launchdeck to deploy, you’ll never have to manually upload files and worry about forgetting one. Just hit “publish”, and Launchdeck will automatically upload all modified files to exactly the right place on your server.

Deploy static website

A better way to deploy code

Get started for free

Free • Simple setup • Cancel any time

A better way to deploy code

Get started for free

Free • Simple setup • Cancel any time

A little bit about the author
Webdesigner and front-end developer. Marketing, UI, UX & SEO enthusiast. Likes to delete buttons, features and settings for a more intuitive design. Life motto: Less is more.