Skip to content

Instantly share code, notes, and snippets.

@reymon359
Last active August 17, 2019 16:23
Show Gist options
  • Save reymon359/286057c798be888cd74f89e94a3d5628 to your computer and use it in GitHub Desktop.
Save reymon359/286057c798be888cd74f89e94a3d5628 to your computer and use it in GitHub Desktop.
Deploy Angular ( 2+ ) project to Github Pages
#! /bin/bash/ps1/
#! 🥝🥝IMPORTANT🍅🍅 Before doing this, change the path of images from path="imagePath" to path="./imagePath"
#! Then install the angular-cli-ghpages globally
npm install -g angular-cli-ghpages
#! Now lets build the project in to a project folder
ng build --prod --output-path project --base-href "https://<githubUsername>.github.io/<repositoryName>/"
#! Publishing it to gh pages
ngh --dir=project
#! Done camione 🚛
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment