How to deploy Static Sites with Surge

How to deploy Static Sites with Surge

1 min read

Surge is a static web publishing tool for the command line. It's the most simple and easy way to deploy a static site that I've ever seen!. Surge is free and includes a lot of cool features out of the box. Just with a single command you will get your site deployed.

What do you need ?

Getting started

To install Surge just run:

$ npm i -g surge

After that you will need to create a surge account providing an email and password. Once you're registered and logged in, you can deploy a static site running surge

$ surge login
$ surge

You'll be asked for the path or folder you want to deploy and the domain for the project. You can add a custom domain inplace of the surge.sh subdomain.

Carlos Cuesta Deploy Surge

Success! Project is published and running at carloscuesta.surge.sh

Use the list command to get a to see every project you’ve published on Surge. To delete a site on Surge just run teardown

$ surge list
$ surge teardown

If you use Gulp or Grunt, you can integrate Surge into your workflow with the existing plugins for Gulp and Grunt.


Enjoyed the article? 😍

Subscribe 👨‍💻