commas
This commit is contained in:
29
deploy/ftp.js
Normal file
29
deploy/ftp.js
Normal file
@@ -0,0 +1,29 @@
|
||||
const FtpDeploy = require("ftp-deploy");
|
||||
const ftpDeploy = new FtpDeploy();
|
||||
|
||||
const config = {
|
||||
user: process.env.FTP_USER,
|
||||
password: process.env.FTP_PASSWORD,
|
||||
host: process.env.FTP_HOST,
|
||||
port: process.env.FTP_PORT,
|
||||
localRoot: __dirname + "/../frontend",
|
||||
remoteRoot: "/public_html/car/",
|
||||
// include: ["*", "**/*"], // this would upload everything except dot files
|
||||
include: ["build/**"],
|
||||
// e.g. exclude sourcemaps, and ALL files in node_modules (including dot files)
|
||||
exclude: ["build/**/*.map", "node_modules/**", "node_modules/**/.*", ".git/**"],
|
||||
// delete ALL existing files at destination before uploading, if true
|
||||
deleteRemote: false,
|
||||
// Passive mode is forced (EPSV command is not sent)
|
||||
forcePasv: true
|
||||
};
|
||||
|
||||
ftpDeploy
|
||||
.deploy(config)
|
||||
.then(res => {
|
||||
console.log("Deployment to FTP finished");
|
||||
return;
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
Reference in New Issue
Block a user