💸Save up to $132K/month in CI costs!👉 Try Free
Skip to main content
← Back to workflows

How to Deploy a Website using FTP and GitHub Action?

samkirkland/FTP-Deploy-Action -
GitHub Action
v4.3.5 🚀
3,454
Contributors
Contributor - SamKirklandContributor - apokalyptikContributor - Trainax

Optimize Your CI/CD Pipeline

Get instant insights into your CI/CD performance and costs. Reduce build times by up to 45% and save on infrastructure costs.

45% Faster Builds
60% Cost Reduction
Usage
on: push
name: Deploy website on push
jobs:
web-deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- name: Get latest code
uses: actions/checkout@v4
- name: Sync files
uses: SamKirkland/FTP-Deploy-[email protected]

FTP-Deploy-Action logo

FTP-Deploy-Action

Deploys a GitHub project to a FTP server using GitHub actions


How to deploy a website using GitHub Action?

FTP Deploy GitHub Action that automates website deployment.

This GitHub Action seems pretty handy for automating website deployments. By integrating it into our workflows, we can streamline the process of pushing updates to our websites without manual intervention.

Sure, here's a rewritten version with a "how to" approach:


How to Build and Publish React/Angular/Vue Website:

To deploy your React, Angular, or Vue website using this GitHub Action, make sure you have an npm script named 'build'. This configuration should work for most node-built websites.

  1. Set up Deployment on Push:
on: push
name: 🚀 Deploy website on push
jobs:
web-deploy:
name: 🎉 Deploy
runs-on: ubuntu-latest
steps:
- name: 🚚 Get latest code
uses: actions/checkout@v4

- name: Use Node.js 16
uses: actions/setup-node@v2
with:
node-version: '16'

- name: 🔨 Build Project
run: |
npm install
npm run build

- name: 📂 Sync files
uses: SamKirkland/FTP-Deploy-[email protected]
with:
server: ftp.samkirkland.com
username: myFtpUserName
password: ${{ secrets.password }}
  1. Deploy via FTPS:
on: push
name: 🚀 Deploy website on push
jobs:
web-deploy:
name: 🎉 Deploy
runs-on: ubuntu-latest
steps:
- name: 🚚 Get latest code
uses: actions/checkout@v4

- name: 📂 Sync files
uses: SamKirkland/FTP-Deploy-[email protected]
with:
server: ftp.samkirkland.com
username: myFtpUserName
password: ${{ secrets.password }}
protocol: ftps
port: 1234 # todo replace with your web host's ftps port

Follow these steps to automate the deployment of your website on each push to your GitHub repository. Make sure to replace placeholders like 'ftp.samkirkland.com' and 'myFtpUserName' with your actual server details.