Skip to content

Instantly share code, notes, and snippets.

@sumonst21
Forked from mahdyar/cPanel.yml
Created February 22, 2023 21:24
Show Gist options
  • Save sumonst21/87b67ef55ad99a9caa670beccbfde496 to your computer and use it in GitHub Desktop.
Save sumonst21/87b67ef55ad99a9caa670beccbfde496 to your computer and use it in GitHub Desktop.
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 }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment