1.0.3 • Published 1 year ago

@mangoz/git-auto-deploy v1.0.3

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

Installation

Install gitautodeploy with npm

  npm install gitautodeploy

Usage/Examples

Initialize cloner

const { InitCloner } = require("gitautodeploy");
const options = {
  token: `https://github.com/settings/tokens`,
  repoOwner: `Repository owner (e.g. OpenAI)`,
  username: `Your username (e.g. Microsoft)`,
  repo: `Repository name (e.g. MinecraftAutoMine)`,
  EnvFile: './.env.local', // If your project includes .env files include the path here.
  RunArgs: [{ prefix: 'npm', postfix: ['run', 'build']}] //Custom args to execute,
  port: 2000 //The port to run the server on default 3000,
  dlServerPort: 3000 // The port the downloaded project will be running on
}

const Downloader = new InitCloner(options);

Attach the webhook and run the server

const webhook = Downloader.AttachWebhook();
const server = Downloader.DeployWebhook();