Skip to content

docs: we are missing a full description of --buildTarget #123

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

Closed
alvachien opened this issue Jan 27, 2021 · 6 comments
Closed

docs: we are missing a full description of --buildTarget #123

alvachien opened this issue Jan 27, 2021 · 6 comments

Comments

@alvachien
Copy link

Facing the following issue when trying to use "ng deploy":
❌ An error occurred when trying to deploy:
Invalid target string: "github"

Firstly, you can figure out the angular.json from my project: https://github.com/alvachien/knowledgebuilder/blob/master/angular.json

The configuration 'github' already defined, and "ng build -c github" works as expected.
The angular.json also including the options defined "angular-cli-ghpages".

Secondly, no matter run "ng deploy --configuration=github" or "ng deploy --build-target=github" results in same issue.

Could you give me a hint to make it work?

Now I using a workaround by a own NPM script: "deploy-github": "ng build -c github && git push origin :gh-pages && git subtree push --prefix dist origin gh-pages"

@JohannesHoppe
Copy link
Member

Looks like the issue was already fixed.

@lukad03
Copy link

lukad03 commented Apr 12, 2021

Can you point to how this was resolved @JohannesHoppe? I'm seeing the same issue still and even seeing it when --build-target is set to production and prod.

@JohannesHoppe
Copy link
Member

JohannesHoppe commented Apr 12, 2021

@lukad03 Could you please provide the exact executed command and your angular.json?

@lukad03
Copy link

lukad03 commented Apr 12, 2021

@JohannesHoppe Sure! https://github.com/XDgov/ML-Bias-Website/blob/lk-staging/angular.json

I actually got the script to work by specifying --build-target=app-name:build:staging

@JohannesHoppe
Copy link
Member

@lukad03 I agree, everybody is confused by this. See angular/angularfire#2281 (comment) 😇

Could you do me (and the project) a big favour and figure out which command does work and which does not?

  • ng deploy
  • ng deploy --build-target=production
  • ng deploy --build-target=staging
  • ng deploy --build-target=bias-in-ai:build
  • ng deploy --build-target=bias-in-ai:build:staging
  • ng deploy --build-target=bias-in-ai:build:production

Bonus points: A PR with an updated README.md 👍

@JohannesHoppe JohannesHoppe reopened this Apr 13, 2021
@JohannesHoppe JohannesHoppe changed the title Invalid target string: "github" docs: we are missing a full description of --buildTarget Apr 13, 2021
@JohannesHoppe
Copy link
Member

This is now documented in the README.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants