Automatic Deployment via good ol’ FTP

Since their release, GitHub actions are on my long-term todo list for increasing automation of my workflows. Thanks to DEVs GitHub Actions Hackathon, I’m finally tackling this topic.

My Workflow

  1. ➕ Make code changes (e.g. fixing an important security issue)
  2. 🔨 Test code changes
  3. ✅ Commit these changes to the repository
  4. 🔁 Create new build files optimized for production using vue-cli-service build
  5. ❌ Delete old build files from production server
  6. ⏫ Upload new build files to production server
  1. ➕ Make code changes (e.g. fixing an important security issue)
  2. 🔨 Test code changes
  3. ✅ Commit these changes to the repository
  4. 🔁 Create new build files optimized for production using vue-cli-service build
  5. Lean back and let the GitHub FTP-Deploy-Action do the rest

Configuration

on:
push:
paths:
- 'dist/*'
name: FTP Deploy
jobs:
FTP-Deploy-Action:
name: FTP-Deploy-Action
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.1.0
with:
fetch-depth: 2
- name: FTP-Deploy-Action
uses: SamKirkland/FTP-Deploy-Action@master
with:
ftp-server: ${{ secrets.ftp_server }}
ftp-username: ${{ secrets.ftp_username }}
ftp-password: ${{ secrets.ftp_password }}
local-dir: dist/

Additional Resources / Info

Wrap it up

--

--

creator. developer. consultant.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store