Skip to content

Instantly share code, notes, and snippets.

@maya257
Last active September 4, 2019 17:41
Show Gist options
  • Save maya257/ec2ce1aeb0fac80cfef7bc09a5ed6a6e to your computer and use it in GitHub Desktop.
Save maya257/ec2ce1aeb0fac80cfef7bc09a5ed6a6e to your computer and use it in GitHub Desktop.
Deploy JavaScript project built using webpack to GitHub Pages

Steps to deploy webpack based JavaScript project to GitHub Pages

  1. From your deployment branch run the following command locally

    git subtree push --prefix dist origin gh-pages

    If your distribution folder is named something else simply replace dist with directory name.

  2. Go to settings and change source to gh-pages branch screenshot

  3. Go to your link. Enjoy. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment