Deploy to Digital Ocean App Platform

Simply Static allows exporting your static website to the Digital Ocean App Platform with the help of the GitHub integration.

What is the Digital Ocean App Platform?

Digital Ocean offers a serverless hosting platform for all kinds of applications, including static sites. The main benefit is that it's free for static sites and includes custom domains, SSL certificates, and a globally distributed CDN.

GitHub

Preparing the GitHub Integration

You need the GitHub integration from Simply Static to export your static website to the Digital Ocean App Platform. Create an account at github.com and configure your personal access token, as shown in the documentation here.

Once that's done, you can switch back to WordPress and go to Simply Static -> Settings-> Deployment and select "GitHub" as a deployment option:

As shown in the GitHub integration documentation, you need to fill out the following setting fields:

  • Account Type (Personal or organization)
  • Username
  • E-Mail
  • Personal Access Token
  • Repository

Exporting files to GitHub

Now that we have everything configured, you can click on Generate Static Files in the top-left corner of the Simply Static Settings:

Finishing the export will take some time, but you can always view the current progress in Simply Static -> Generate -> Activity Log.

Once the export is finished, all your static files will be exported to your configured GitHub repository. If you check your account, it should be similar to this:

That's all we needed to do within Simply Static and the GitHub integration. We can now get into the Digital Ocean App Platform.

Set up your static site in the Digital Ocean App Platform

Log in to your Digital Ocean account and navigate to App Platform. You will find a couple of examples that can be deployed with the service, and one is static sites.

Click on the Create app button in the top right corner to start the setup. The first thing we have to do is authorize Digital Ocean to get access to our GitHub repository.

Select GitHub and click on the Manage Access button. It will redirect you to GitHub, where you can select which repository Digital Ocean will get access to and if this connection should be permanent or temporary.

Once done, you can select the repository which contains your static files and click next.

If you use a branch different from the default one called main, ensure you also change this setting.

Now that we have configured everything important for your static site, you can click the Skip to Review button to skip the other settings - these are only needed when deploying a dynamic application.

It will list all things related to your static site, like the temporary project name, the server location, and a pricing table (which should be $0 as hosting static sites on Digital Ocean is free):

Once you click on Create Resources, Digital Ocean will start the deployment process. Depending on the size of your project, this might take a couple of seconds:

Once it's done, you can check the result on the temporary domain that was generated by Digital Ocean for you:

Congratulations, you successfully deployed your static site with the Digital Ocean App Platform!

Custom Domain and Redirects

Now that you have deployed your static site and checked that everything looks as expected, you might want to set up a custom domain or redirects for your static site.

You will find the settings right within your app settings:

As these things aren't specific to static sites, we decided to link these directly from Digital Ocean.

Remember, Simply Static is creating redirects for you automatically. You only want to set up redirects within Digital Ocean if you want to change something globally.