0

I am front and engineer and have no experience with deploying.

I am developing my pet project using angular-cli.

How can I deploy it on github pages?

There is another simple way to do this?

1

1 Answer 1

1

You should follow the angular-cli Wiki stories which can be found here.

The one you're looking for is Deploy to GitHub Pages.

A simple way to deploy your Angular app is to use GitHub Pages.

The first step is to create a GitHub account, and then create a repository for your project. Make a note of the user name and project name in GitHub.

Then all you need to do is run ng build --prod --output-path docs --base-href PROJECT_NAME, where PROJECT_NAME is the name of your project in GitHub. Make a copy of docs/index.html and name it docs/404.html.

Commit your changes and push. On the GitHub project page, configure it to publish from the docs folder.

And that's all you need to do! Now you can see your page at https://USER_NAME.github.io/PROJECT_NAME/.

You can also use angular-clip-ghpages, a full featured package that does this all this for you and has extra functionality.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.