Skip to content

Instantly share code, notes, and snippets.

@sadikaya
Forked from maciejkorsan/deploy.js
Created March 12, 2018 11:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sadikaya/6ef8692ae49e0c7369608a99e5ef9aa4 to your computer and use it in GitHub Desktop.
Save sadikaya/6ef8692ae49e0c7369608a99e5ef9aa4 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