Skip to content

Instantly share code, notes, and snippets.

@mebaysan
Created August 18, 2022 07:32
Show Gist options
  • Save mebaysan/9ae80131cdf588fc898d426f7344b917 to your computer and use it in GitHub Desktop.
Save mebaysan/9ae80131cdf588fc898d426f7344b917 to your computer and use it in GitHub Desktop.
GitHub Action File to Deploy Files via FTP
# This is a basic workflow to help you get started with Actions
name: Kodları push edildiğinde sunucuya aktar.
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ master ]
pull_request:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
web-deploy:
name: 🎉 Deploy
runs-on: ubuntu-latest
steps:
- name: 🚚 Get latest code
uses: actions/checkout@v2
- name: 📂 Sync files
uses: SamKirkland/FTP-Deploy-Action@4.3.0
with:
server: {{SERVER_IP}}
username: {{SERVER_USER}}
password: {{SERVER_PASSWORD}}
protocol: ftp
port: 21
local-dir: wp-content/themes/
server-dir: public_html/wp-content/themes/
exclude: .git*
- .git*/**
- **/.git*/**
- node_modules/**
- node_modules/**/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment