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

@Brocco Brocco requested review from hansl and filipesilva Feb 3, 2017
@googlebot googlebot added the cla: yes label Feb 3, 2017
Copy link
Contributor

@hansl hansl left a comment

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'

This comment has been minimized.

@hansl

hansl Feb 3, 2017
Contributor

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 Brocco force-pushed the Brocco:remove-gh-deploy branch from 66b59bb to 0f83110 Feb 3, 2017
@Brocco
Copy link
Contributor Author

@Brocco Brocco commented Feb 3, 2017

nit addressed

@hansl
hansl approved these changes Feb 3, 2017
@hansl
Copy link
Contributor

@hansl hansl commented Feb 3, 2017

LGTM.

@hansl hansl merged commit 0f8689b into angular:master Feb 3, 2017
3 checks passed
3 checks passed
cla/google All necessary CLAs are signed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@JohannesHoppe
Copy link
Contributor

@JohannesHoppe JohannesHoppe commented Feb 3, 2017

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

@filipesilva
Copy link
Member

@filipesilva filipesilva commented Feb 3, 2017

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

MRHarrison added 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 Brocco:remove-gh-deploy branch Feb 11, 2017
@petersgiles
Copy link

@petersgiles petersgiles commented Feb 12, 2017

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 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

@JohannesHoppe JohannesHoppe commented Feb 12, 2017

@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

@petersgiles petersgiles commented Feb 13, 2017

@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

@JohannesHoppe JohannesHoppe commented Feb 13, 2017

@tkow
Copy link

@tkow 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

@gkucmierz gkucmierz commented Feb 19, 2017

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

@JohannesHoppe JohannesHoppe commented Feb 19, 2017

@JohannesHoppe
Copy link
Contributor

@JohannesHoppe 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 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 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

@JohannesHoppe JohannesHoppe commented Feb 24, 2017

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

@aakash14goplani aakash14goplani commented Apr 8, 2017

@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 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 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
Member

@filipesilva filipesilva commented Aug 7, 2019

@JohannesHoppe that's pretty nifty! cc @mgechev

@angular-automatic-lock-bot
Copy link

@angular-automatic-lock-bot angular-automatic-lock-bot bot commented Sep 13, 2019

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.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

10 participants
You can’t perform that action at this time.