Skip to content

Commit

Permalink
replace dploy package with ftp-deply, added new deploy config, remove…
Browse files Browse the repository at this point in the history
… old dploy config
  • Loading branch information
ericalli committed Aug 14, 2019
1 parent aadcfe2 commit 2cda46f
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 10 deletions.
34 changes: 34 additions & 0 deletions config/site.deploy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
const path = require('path');
const config = require('./site.config');
const FtpDeploy = require('ftp-deploy');

const ftpDeploy = new FtpDeploy();

ftpDeploy.deploy({
// FTP username
user: 'username',

// FTP Password
password: 'password',

// FTP Host
host: 'ftp.yourwebsite.com',

// FTP Port
port: 21,

// Local folder to upload
localRoot: path.join(config.root, config.paths.dist),

// Remote FTP folder to upload to
remoteRoot: '/public_html/',

// Define what files to include in the upload (by default, upload everything in dist/ folder)
include: ['**/*'],

// Remove files in FTP folder before uploading
deleteRemote: true,

// FTP Mode
forcePasv: true,
});
9 changes: 0 additions & 9 deletions dploy.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"lint:js": "./node_modules/.bin/eslint \"src/**/*.js\"",
"lint:styles": "stylelint \"src/**/*.scss\"",
"build:dist": "cross-env NODE_ENV=production webpack --config ./config/webpack.config.js",
"deploy": "node ./deploy.js"
"deploy": "node ./config/site.deploy.js"
},
"devDependencies": {
"@babel/cli": "^7.5.5",
Expand Down

0 comments on commit 2cda46f

Please sign in to comment.