Deploy to cPanel with GitHub Actions (FTP) · GitHub











Instantly share code, notes, and snippets.

Deploy to cPanel with GitHub Actions (FTP)

name: Deploy to cPanel
on:
push:
branches:
master
jobs:
FTP-Deploy-Action:
name: FTP-Deploy-Action
runs-on: ubuntu-latest
steps:
uses: actions/checkout@v2.1.0
with:
fetch-depth: 2
# Deploy to cPanel
name: FTP-Deploy-Action
uses: SamKirkland/FTP-Deploy-Action@3.1.1
with:
ftp-server: ${{ secrets.FTP_SERVER }}
ftp-username: ${{ secrets.FTP_USERNAME }}
ftp-password: ${{ secrets.FTP_PASSWORD }}
# Purge CF’s cache (optional)
name: Purge cache
uses: jakejarvis/cloudflare-purge-action@master
env:
CLOUDFLARE_ZONE: ${{ secrets.CLOUDFLARE_ZONE }}
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }}



Source link