makestatic-deploy-site v1.0.18
Deploy Site
Deploy build files
Deploys build files using a configured deployment provider.
Install
yarn add makestatic-deploy-siteConfiguration
The general syntax to configure a deployment is to add a deploy object with an environment and a deployment provider, for example to configure the stage environment to deploy to amazon s3:
module.exports = {
deploy: {
stage: {
s3: {
domain: 'website.com',
credentials: {
profile: 'default'
}
}
}
}
}Deployment provider modules are resolved relative to your project so you need to install the providers you wish to use.
npm i makestatic-deploy-s3 --saveYou can then clean, build and deploy the application with:
makestatic --env stage --provider s3If you have an existing build and don't want to build before deployment you can perform a deployment by itself using the --deploy flag:
makestatic --env stage --provider s3 -dAPI
DeploySite
Deploys the site to a configured deployment provider.
Deployment providers are classes that expose a deploy method.
This plugin will (after validation) instantiate an instance of the provider
class and call the deploy function passing the processing context, the
deployment config and the plugin options.
The provider deploy function should return a promise that resolves once
the deployment is complete.
See Also
.before
DeploySite.prototype.before(context, options)Validates deployment for a provider.
contextObject the processing context.optionsObject the plugin options.
Throws
Errorif no deployment configuration is detected.Errorif no environment has been specified.Errorif no deployment provider has been specified.Errorif no deployment for the environment is configured.Errorif the output directory does not exist.
.after
DeploySite.prototype.after(context, options)Performs deployment for a provider.
contextObject the processing context.optionsObject the plugin options.
Throws
Errorif the deployment provider module could not be found.Errorif the deployment provider module errors.
#getProviderModuleName
static getProviderModuleName(config)Gets the name of the module to require for a deployment provider.
The convention is to prepend makestatic-deploy- to the provider
identifier.
Returns string module name.
configObject the deployment configuration.
#getProvider
static getProvider(config)Requires a deployment provider module.
Deployment provider modules should resolve to a class.
Returns the deployment provider module.
configObject the deployment configuration.
License
MIT
Created by mkdoc on March 12, 2017
8 years ago
8 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago