Skip to content

Instantly share code, notes, and snippets.

@sawyerbutton
Created April 16, 2023 02:39
Show Gist options
  • Select an option

  • Save sawyerbutton/40be5421a4f799e53db7b96ec200cd0f to your computer and use it in GitHub Desktop.

Select an option

Save sawyerbutton/40be5421a4f799e53db7b96ec200cd0f to your computer and use it in GitHub Desktop.

Deploy Angular to Github Ghpages

  1. Create a GitHub repository for your project and pushed the code to the main/master branch.
  2. Create a GH-pages branch and push to origin
git branch gh-pages
git checkout gh-pages
git push origin gh-pages
  1. Get repo link from your Github repo's setting page image

  2. Insall gh-pages plugin for Angular CLI

ng add angular-cli-ghpages
  1. Deploy APP
ng deploy --base-href=https://GithubUserName.github.io/GithubRepoName/

Remember to replace the above link with the live link from GH pages

  1. View your deployed page

visit your LINK

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