From a00824c986822dda3e6583c4732f3ae5eb012adc Mon Sep 17 00:00:00 2001 From: mgechev Date: Wed, 21 Aug 2019 12:10:12 -0700 Subject: [PATCH] docs: restructure the ng deploy section (#32227) PR Close #32227 --- aio/content/guide/deployment.md | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/aio/content/guide/deployment.md b/aio/content/guide/deployment.md index be07db4dd5..53cc7bff09 100644 --- a/aio/content/guide/deployment.md +++ b/aio/content/guide/deployment.md @@ -55,19 +55,11 @@ This method is for development and testing only, and is not a supported or secur ### Automatic deployment with the CLI -The Angluar CLI command `ng deploy` (introduced in version 8.3.0) executes the `deploy` [CLI builder](https://angular.io/guide/cli-builder) associated with your project. A number of third-party builders implement deployment capabilities to different platforms. These include the following. +The Angluar CLI command `ng deploy` (introduced in version 8.3.0) executes the `deploy` [CLI builder](https://angular.io/guide/cli-builder) associated with your project. A number of third-party builders implement deployment capabilities to different platforms. You can add any of them to your project by running `ng add [package name]`. -| Deployment to | Package | -|---------------------------------------------------------------|--------------------------------------------------------------------------------| -| [Firebase hosting](https://firebase.google.com/docs/hosting) | [`@angular/fire`](https://npmjs.org/package/@angular/fire) | -| [Azure](https://azure.microsoft.com/en-us/) | [`@azure/ng-deploy`](https://npmjs.org/package/@azure/ng-deploy) | -| [Now](https://zeit.co/now) | [`@zeit/ng-deploy`](https://npmjs.org/package/@zeit/ng-deploy) | -| [Netlify](https://www.netlify.com/) | [`@netlify-builder/deploy`](https://npmjs.org/package/@netlify-builder/deploy) | -| [GitHub pages](https://pages.github.com/) | [`angular-cli-ghpages`](https://npmjs.org/package/angular-cli-ghpages) | +When you add a package with deployment capability, it'll automatically update your workspace configuration (`angular.json` file) with a `deploy` section for the selected project. As the next step, to deploy your project you can run `ng deploy`. -You can read how to use the listed deployment builders following the links associated with each package name above. - -For example, the following command automatically deploys the current project to Firebase. +For example, the following command automatically deploys a project to Firebase. ng add @angular/fire @@ -78,6 +70,16 @@ The command is interactive. In this case, you must have or create a Firebase acc After the command produces an optimal build of your application (equivalent to `ng deploy --prod`), it'll upload the production assets to Firebase. +In the table below, you can find a list of packages which implement deployment functionality to different platforms. The `deploy` command for each package may require different command line options. You can read more by following the links associated with the package names below: + +| Deployment to | Package | +|---------------------------------------------------------------|--------------------------------------------------------------------------------| +| [Firebase hosting](https://firebase.google.com/docs/hosting) | [`@angular/fire`](https://npmjs.org/package/@angular/fire) | +| [Azure](https://azure.microsoft.com/en-us/) | [`@azure/ng-deploy`](https://npmjs.org/package/@azure/ng-deploy) | +| [Now](https://zeit.co/now) | [`@zeit/ng-deploy`](https://npmjs.org/package/@zeit/ng-deploy) | +| [Netlify](https://www.netlify.com/) | [`@netlify-builder/deploy`](https://npmjs.org/package/@netlify-builder/deploy) | +| [GitHub pages](https://pages.github.com/) | [`angular-cli-ghpages`](https://npmjs.org/package/angular-cli-ghpages) | + If you're deploying to a self-managed server or there's no builder for your favorite cloud platform, you can either create a builder that allows you to use the `ng deploy` command, or read through this guide to learn how to manually deploy your app. ### Basic deployment to a remote server