FTP alternatives research

Ever since I tried Netlify, I have less patience for FTPing files to a server. I’m trying to automate as much of my work as possible to take out the possibility of human error and save time. Here are a few resources I’ve found that have helped me out immensely.

Netlify – This is the Cadillac of web automation in my opinion, it’s free for basic uses and reasonably priced if you want to add more team members or need additional features. Highly recommended.

When Netlify doesn’t cut it (like if I need something to live within a sub-directory on my domain — oswego.edu/something), I’ve tried making my own mini-Netlify on the server here using the information in Mattias Geniar’s helpful article.

Essentially it teaches you how to host your own git repo on a server (which was way easier than I thought it would be!), add that as a new remote to your local repo, and then write a post-receive script that publishes your changes on your own server.

The only issue I’m having with this method is running the build process after I push to the remote since Node isn’t on the server I’m pushing to.

Another option is doing a simple deploy with rsync. This article from Kyle MacQuarrie explains it nicely. Essentially he outlines a way to use npm scripts within your package.json file to handle deployments.

Example package.json:

"scripts": {
  "build": "webpack --config webpack.production.js",
  "transfer": "rsync -avz --delete project-name deployuser@server.domain:/path/to/static/files/"
  "deploy": "npm run build && npm run transfer"
}

Example terminal command:

$ npm run deploy

Leave a comment

What do you think?

%d bloggers like this: