Deploying your application

When you run grunt build, it generates a completely optimized version of your application in a dist directory that can be deployed.

The recommended way of deploying the dist directory is using git subtree.

  1. Remove the dist directory from the .gitignore file.

  2. Add the dist directory to your repository and commit it with your project.

    git add dist && git commit -m "Initial dist subtree commit"
    
  3. Once the dist directory is part of your project we can use git subtree to set up a separate repository on a different branch.

    // Deploying dist to GitHub Pages
    git subtree push --prefix dist origin gh-pages
    

    Note: prefix must be the relative path to your dist directory. This is assuming dist is in your root directory.

  4. Now you can commit to your entire repository in your default (master) branch and whenever you want to deploy the dist directory you can run:

    git subtree push --prefix dist origin gh-pages
    

Some common errors

Extra

Git Subtree Documentation

Yeoman Build

Github Pages

generator-heroku