Skip to content

Instantly share code, notes, and snippets.

@maciejkorsan
Created January 24, 2018 13:21
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save maciejkorsan/3e7c77959ff551c447193e2d7d5c3a7a to your computer and use it in GitHub Desktop.
Save maciejkorsan/3e7c77959ff551c447193e2d7d5c3a7a to your computer and use it in GitHub Desktop.
deploy.js script for CircleCI GitHub - FTP upload
var FtpDeploy = require('ftp-deploy');
var ftpDeploy = new FtpDeploy();
var config = {
username: process.env.FTPUSERNAME,
password: process.env.FTPPASS,
host: process.env.FTPHOST,
port: 21,
localRoot: __dirname + "/../dist/",
remoteRoot: "/",
include: ['*']
}
ftpDeploy.deploy(config, function(err) {
if (err) console.log(err)
else console.log('finished');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment