Continuous Deployment

Continuous deployment works by connecting a Github repository to a Netlify site and keep the two in synch.

It works both for plain static sites, but it’s even more powerful when you’re using a static site generator or a front end build tool like Grunt, Gulp or Broccoli.

Netlify will run your build command and deploy the result whenever you push to Github.

  • No deploying without committing and pushing first
  • Easy collaboration through pull requests
  • Fix a typo through Github’s web UI from your mobile
  • Let non-technical users contribute by using prose.io

Dependencies

Netlify will install any dependencies from any Gemfile, package.json, bower.json or requirements.txt in the root of your repository, before running your build. Any executables from these dependencies will be made available from the PATH.

Make sure to include your build tool in these dependencies:

  • If you’re using Jekyll, make sure to add a Gemfile that requires the jekyll gem
  • If you’re using Grunt, make sure to add a package.json with grunt-cli as a dependency
  • If you’re using Roots, make sure to install roots in your local package.json and not just globally
  • If you’re using mkdocs, make sure to add a requirements.txt with mkdocs>=0.9.0

Dependency Cache

The first build you do can take some time while we install all of your dependencies. After the build we’ll cache the dependencies, so we don’t have to start from scratch each time you push an update. This means subsequent builds will be really fast.

Examples

Here are some examples of configuring your site for common build tools:

Build Tool Directory Command
Jekyll _site jekyll build
Grunt dist grunt build
Middleman build middleman build
Roots public roots compile