Learn how to set up a seamless continuous deployment workflow using GitHub Actions and FTP.
This guide walks you through the procedure of deploying a web application automatically via FTP with the assistance of GitHub Actions. This workflow allows for continuous deployment, where updates to your GitHub repository are automatically pushed to your FTP server.
name: FTP Deployment
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Deploy over FTP
uses: SamKirkland/FTP-Deploy-Action@3.2.0
with:
server: YOUR_SERVER_ADDRESS
username: ${{ secrets.FTP_USERNAME }}
password: ${{ secrets.FTP_PASSWORD }}
server-dir: /your/server/folder
local-dir: ./your/local/folder
You have now implemented an automatic deployment process using GitHub Actions. Updates to your repository will now automatically trigger an FTP push to your server. This automation simplifies deployment, as there is no need to manually transfer files.