From e921813894b390790e57dbbe43589c81db164b12 Mon Sep 17 00:00:00 2001 From: Mark Date: Wed, 8 Apr 2026 22:08:05 +0200 Subject: [PATCH] Add Gitea workflow for automatic FTP deployment to production --- .gitea/workflows/deploy.yml | 39 +++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .gitea/workflows/deploy.yml diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml new file mode 100644 index 0000000..b2fc7df --- /dev/null +++ b/.gitea/workflows/deploy.yml @@ -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 }}