Skip to content
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

refactor(@angular/cli): removed the github pages deploy command #4385

Merged
merged 1 commit into from
Feb 3, 2017

Conversation

Brocco
Copy link
Contributor

@Brocco Brocco commented Feb 3, 2017

BREAKING CHANGE: This command is being removed from the core of the CLI
There are several options for deploying CLI-based applications outside the scope of this project.
One of which being https://github.com/angular-buch/angular-cli-ghpages
This functionality is likely to return in the form of an addon/plugin in the future

Copy link
Contributor

@hansl hansl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One nit, otherwise LGTM.

@@ -6,11 +6,10 @@
# or ng completion 1>> ~/.zshrc 2>>&1
#

ng_opts='b build completion doc e2e g generate get github-pages:deploy gh-pages:deploy h help i init install lint make-this-awesome new s serve server set t test v version'
ng_opts='b build completion doc e2e g generate get h help i init install lint make-this-awesome new s serve server set t test v version'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you undo the changes to completion.sh? We have a change coming to it and this won't be needed, and I'd like to commit both without having to rebase one of you ;)

BREAKING CHANGE: This command is being removed from the core of the CLI
There are several options for deploying CLI-based applications outside the scope of this project.
One of which being https://github.com/angular-buch/angular-cli-ghpages
This functionality is likely to return in the form of an addon/plugin in the future
@Brocco
Copy link
Contributor Author

Brocco commented Feb 3, 2017

nit addressed

@hansl
Copy link
Contributor

hansl commented Feb 3, 2017

LGTM.

@hansl hansl merged commit 0f8689b into angular:master Feb 3, 2017
@JohannesHoppe
Copy link
Contributor

Thanks for mentioning us. I expect some more traffic now! 😄

@filipesilva
Copy link
Contributor

@JohannesHoppe I always thought your command was very well designed so you deserve it 👍

MRHarrison pushed a commit to MRHarrison/angular-cli that referenced this pull request Feb 9, 2017
…lar#4385)

BREAKING CHANGE: This command is being removed from the core of the CLI
There are several options for deploying CLI-based applications outside the scope of this project.
One of which being https://github.com/angular-buch/angular-cli-ghpages
This functionality is likely to return in the form of an addon/plugin in the future
@Brocco Brocco deleted the remove-gh-deploy branch February 11, 2017 16:31
@petersgiles
Copy link

for anyone who needs more explicit instructions

  1. npm install -g angular-cli-ghpages (doesn't work if its not global)
  2. Then in your package.json
    "scripts": { "deploy": "ng build -sm -ec -bh /repo name/ & ngh --silent=false",...
  3. when you want to deploy npm run deploy

@JohannesHoppe
Copy link
Contributor

JohannesHoppe commented Feb 12, 2017

Don't forget to copy the file dist/index.html to dist/404.html! 😏
(see here)

@JohannesHoppe
Copy link
Contributor

@petersgiles Could you please verify the the ngh command really just works globally? It's supposed to work local (npm i angular-cli-ghpages --save-dev + run script in package.json) AND global (as described).

If this is really the case, please submit an issue.

@petersgiles
Copy link

@JohannesHoppe yep that's the way it happened for me.

I tried installing npm install --save-dev angular-cli-ghpages and it didn't make the ngh available so I uninstalled it and did npm install -g angular-cli-ghpages and it worked.

macOS Sierra

node: 6.9.5
os: darwin x64
@angular/common: 2.4.7
@angular/compiler: 2.4.7
@angular/core: 2.4.7
@angular/flex-layout: 2.0.0-beta.5
@angular/forms: 2.4.7
@angular/http: 2.4.7
@angular/material: 2.0.0-beta.1
@angular/platform-browser: 2.4.7
@angular/platform-browser-dynamic: 2.4.7
@angular/router: 3.4.7
@angular/cli: 1.0.0-beta.31
@angular/compiler-cli: 2.4.7

@JohannesHoppe
Copy link
Contributor

@petersgiles I will take a look: angular-schule/angular-cli-ghpages#5

@tkow
Copy link

tkow commented Feb 18, 2017

It seems @petersgiles 's problem that ngh command is not incleded in your path because node install packages in node_moudules/.bin when local installing. $(pwd)/node_moudules/.bin path are exported when npm commands run before executed so that node's package commands are available in scripts in package.json but not shell environment with no explicitly path prefix . npm support npm bin command which get path $(pwd)/node_modules/.bin So, you can use ngh commands by $(npm bin)/ngh ... . However, I have another problem catch message says "An error occurred!" in node v.7.4.0.
and details bellow.

(node:6042) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: Unspecified error (run without silent option for detail)
(node:6042) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Please tell me how it cause to address, if there are someone feel not uncomfortable.I'll try to downgrade node version.Then , I move to angular-buch/angular-cli-ghpages repository for this ploblem is not angular-cli.

@gkucmierz
Copy link

Why it was removed from ng-cli?

It was working good here, but now this external package is broken
angular-schule/angular-cli-ghpages#9

@JohannesHoppe
Copy link
Contributor

@tkow - please see
angular-schule/angular-cli-ghpages#5
angular-schule/angular-cli-ghpages#11
for further discusson

@JohannesHoppe
Copy link
Contributor

JohannesHoppe commented Feb 19, 2017

@gkucmierz You can always deploy your /dist folder "by hand", it you don't like angular-cli-ghpages!
Some instructions are here (replace doc by dist).

@Brocco
Copy link
Contributor Author

Brocco commented Feb 20, 2017

@gkucmierz there were many reported issues with this command, so rather than ship the CLI with the issues it was decided to remove it, especially with some viable community alternatives.

@urish
Copy link

urish commented Feb 24, 2017

An alternative is the gh-pages package, I use it for ages and it works fine:

npm install --save-dev gh-pages

then, in your package.json:

"scripts": {
    "deploy": "ng build -prod -sm -ec -bh /reponame/ && gh-pages -d dist"
}

(don't forget to replace /reponame/ with your actual repo name)

@JohannesHoppe
Copy link
Contributor

Unfortionally this does not work out of the box on Travis-CI. That was the main reason to start angular-cli-ghpages on top of ghpages.

@aakash14goplani
Copy link

@petersgiles
In your explicit instructions "scripts": { "deploy": "ng build -sm -ec -bh /repo name/ & ngh --silent=false", throws error

error: unknown option `--silent'

thing that work for me was ngh --no-silent

@Brocco
Copy link
Contributor Author

Brocco commented Apr 10, 2017

@aakash14goplani Can you please take your current issue over the https://github.com/angular-buch/angular-cli-ghpages repo?

Thanks! And good luck getting your app deployed.

@JohannesHoppe
Copy link
Contributor

JohannesHoppe commented Aug 6, 2019

Hello, friends. In Angular CLI 8.3.0-next.0. the builders where enhanced which gives us the command: ng deploy

This means that the old "github pages deploy command" also returns to the Angular CLI:

ng update @angular/cli@8.3.0-next.1 @angular/core@8.2.1
ng add angular-cli-ghpages
ng deploy

angular-cli-ghpages-deploy

More at:
https://github.com/angular-schule/angular-cli-ghpages

Wishing you a wonderful day! 😃

@filipesilva
Copy link
Contributor

@JohannesHoppe that's pretty nifty! cc @mgechev

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants