-
Notifications
You must be signed in to change notification settings - Fork 12k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deploying Github Page #720
Comments
Heya, I think this is related to (but perhaps not fully caused by) you using a user page instead of a project page. Basically, when you do a user page, the generated content must be in the master branch, and to be honest that case isn't well covered yet. Can I ask you to try again with a different project name? Meanwhile I'll work on both enabling and documenting the user page scenario. |
Not sure if this is related, but I was able to successfully deploy to github pages using ng github-pages:deploy --message "Optional commit message" After deployment, I saw a blank page with a bunch of errors in the console. I figured it was related to the base href, so I used the dynamic method outlined in the docs. <script>document.write('');</script>That fixed my blank page. https://emmanueltsouris.github.io/ng2-MediaBrowser/ |
I seem to recall that there was also an anomoly with the link and the base href when I first published to github pages. Somehow there was an extra dash in the name. So my project ng2-MediaBrowser had ng2-media**-browser in the base href (was also shown to me by the cli output). When I navigated to the url, I saw a 404. When I noticed the extra dash, I looked at my repo settings, saw that the correct page url was actually .../ng2-MediaBrowser and not .../ng2-Media-**Browser Not sure where that extra dash came from, if it was my typing or a bug in the cli. I'll run it again with a similar project name when I have a chance. |
@EmmanuelTsouris Thanks for the suggestions I'll have another look! I'll also checkout your project to compare to see what I possibly did wrong |
@EmmanuelTsouris I'm glad to hear the feature worked for you! Not too sure of the extra dash issue, can you tell me your results with the new project? @piotrromanowski I put up a PR that should allow you to easily push a user/org page (instead of a project page), you can find it here: #772 It also fixes a current bug that completely breaks the deploy process. |
@filipesilva I tested it again with a new project, this time I hadn't created the github project beforehand. I created a project
I did a commit (no remote origin set yet), and then tried to do a github-pages deploy
Now I'm having issues with the token, I created a token initially with just the public repo access, but was getting access denied messages, so tried a few different extra perms, none seemed to work. When I did this all before with my other project, I had created the project using the same name as the folder and added it as origin before doing the github-pages deploy. Which may be why it worked, and why the base href had the dash (but my project folder didn't have a dash). Hope this helps |
@EmmanuelTsouris hm, odd that it fails with a token issue after the project is created on github... The token is solely used to create the github repo, so I wouldn't expect it to be used in any way after that. Can you copy paste the error you got? If it's something like |
@filipesilva here's the error, it was a classic missing key in git:
I [stepped through my git config](https://help.github.com/articles/error-permission-denied-publickey/ to). Not an issue with angular-cli, just git being flakey with using the Github Mac generated github_rsa |
@EmmanuelTsouris awesome, glad to hear it now works well! I like the message on the page as well :D |
Getting "Failed to create GitHub repo. Error: 401 Unauthorized" when tries to deploys angular 2 app to my organization guthub page . Asking for a token and fails with 401 ng github-pages:deploy ? Please enter GitHub token you just created (used only once to create the repo): |
@filipesilva Please help . ng github-pages:deploy ? Please enter GitHub token you just created (used only once to create the repo): |
@priyeshn sounds like a GitHub command line issue. Have you looked at https://help.github.com/articles/creating-an-access-token-for-command-line-use/ |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
When you run the command
ng github-pages:deploy
and the project successfully creates a branch on your github account, you receive message that says
Deployed! Visit https://${userName}.github.io/${projectName}/
and
Github pages might take a few minutes to show the deployed site.
however the site is actually never deployed. It just creates the "gh-pages" branch on that repository.
The text was updated successfully, but these errors were encountered: