Skip to content

Latest commit

 

History

History

deploy

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

garden netlify-deploy

Deploy the given directory to a Netlify site.

Usage

import { netlifyDeploy } from '@zendeskgarden/scripts';

const args: {
  dir: string;
  production?: boolean;
  siteId?: string;
  token?: string;
  message?: string;
} = {
  dir: __dirname
  /* optional overrides */
};

(async () => {
  const result = await netlifyDeploy(args);

  if (result) {
    const { url, logUrl } = result;

    console.log(url, logUrl);
  }
})();

Arguments

  • dir directory of content to deploy.
  • production determine whether this is a production or draft deploy; defaults to draft.
  • siteId optional Netlify site API ID; defaults to the value provided by netlifySiteId.
  • token optional Netlify personal access token; defaults to the value provided by netlifyToken.
  • message optional deployment message.

Command

garden netlify-deploy \
       [--production] \
       [--id <id>] \
       [--token <token>] \
       [--message <message>] \
       <dir>