The tag and snap pipelines of an app component include an additional build task that deploys the app's artifacts.
To snap and deploy your app, run the following:
To snap with a release version, and deploy your app, run the following:
The Angular app plugin does not provide a default deployer. Search bit.cloud for a deployer, and set it in your app's plugin file.
For example:
Run the following to install the Netlify deployer:
Set the Netlify deployer in your app plugin file (.ng-app.ts
):
import { NetlifyOptions, Netlify, } from '@teambit/cloud-providers.deployers.netlify'; import { AngularAppOptions } from '@bitdev/angular.app-types.angular-app-type'; const netlify: NetlifyOptions = { /* * your Netlify authentication token. it's recommended to store the token it an env variable. * https://docs.netlify.com/cli/get-started/#obtain-a-token-in-the-netlify-ui */ accessToken: process.env.NETLIFY_AUTH_TOKEN as string, productionSiteName: 'my-awesome-site', stagingSiteName: 'my-awesome-staging-site', /** * your Netlify team slug */ team: 'a-team', }; export const MyAngularAppOptions: AngularAppOptions = { name: 'my-angular-app', // ... deploy: Netlify.deploy(netlify), }; export default MyAngularAppOptions;
Create a custom deployer
To create your own deployer, fork an existing deployer component or start from scratch.
You can choose to not use the deployment function and instead to deploy your app's artifacts using your existing CI. For this, make sure to first disable you deployment function. After that you can build your app component and look for the artifacts in the workspace capsule, or snap your app component and extract the artifacts with this command:
The artifacts are now available in the new build
directory at the root of your project.
Use this directory to deploy with your existing tools and workflows. For example: