Add Gitea workflow for automatic FTP deployment to production

This commit is contained in:
Mark 2026-04-08 22:08:05 +02:00
parent f3187036c1
commit e921813894
1 changed files with 39 additions and 0 deletions

View File

@ -0,0 +1,39 @@
name: Deploy to Production
on:
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install lftp
run: |
apt-get update
apt-get install -y lftp
- name: Deploy to Production Server (FTP)
run: |
echo "🚀 Deploying to Production..."
lftp -c "
set ftp:ssl-allow no
set ftp:passive-mode yes
open -u ${FTP_USER},${FTP_PASS} ${FTP_HOST}
mirror -R --delete --verbose \
--exclude-glob .git/ \
--exclude-glob .gitea/ \
--exclude-glob .gitignore \
--exclude-glob designs/ \
./ ${TARGET_DIR}
"
env:
FTP_HOST: ${{ secrets.FTP_HOST }}
FTP_USER: ${{ secrets.FTP_USER }}
FTP_PASS: ${{ secrets.FTP_PASS }}
TARGET_DIR: ${{ secrets.TARGET_DIR }}