From 68794c9a978171038987d334340cedfdd3214943 Mon Sep 17 00:00:00 2001 From: ravigulhane Date: Fri, 22 May 2026 05:13:10 +0000 Subject: [PATCH] Update .gitea/workflows/ftp_deploy.yml/ftp_deploy.yml --- .../workflows/ftp_deploy.yml/ftp_deploy.yml | 43 ++++++++----------- 1 file changed, 19 insertions(+), 24 deletions(-) diff --git a/.gitea/workflows/ftp_deploy.yml/ftp_deploy.yml b/.gitea/workflows/ftp_deploy.yml/ftp_deploy.yml index a14b13e4..afe6568c 100644 --- a/.gitea/workflows/ftp_deploy.yml/ftp_deploy.yml +++ b/.gitea/workflows/ftp_deploy.yml/ftp_deploy.yml @@ -1,4 +1,4 @@ -name: Local to Remote RSYNC Deploy +name: Specific Folder FTP Upload on: push: @@ -8,27 +8,22 @@ on: - 'resources/views/form/**' jobs: - deploy: - runs-on: host # 👈 Change from 'ubuntu-latest' to 'host' + ftp-deploy: + runs-on: ubuntu-latest steps: - - name: Fetch Locally and RSYNC to Remote VPS - run: | - echo "📂 1. Navigating to local directory..." - cd /var/www/rapport - - echo "🔄 2. Fetching latest changes from Gitea down to local..." - git fetch origin main - git reset --hard origin/main - - echo "🔒 3. Securing SSH Key permissions for the sync..." - # Enforces strict owner-only permissions so SSH doesn't reject the key - chmod 600 /home/swtserver/ravimac - - echo "🚚 4. Pushing changes from local folder to the remote server..." - # Uses lowercase verbose flags and parent-folder directory target mapping - rsync -rlgodivzc \ - -e "ssh -p 22 -i /home/swtserver/ravimac -o StrictHostKeyChecking=no" \ - resources/views/form \ - root@157.245.101.206:/var/www/rapport/resources/views/ - - echo "✨ Remote deployment successful!" \ No newline at end of file + # 1. Checkout the repository code fully + - name: Checkout Repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + # 2. Sync the targeted folder using the corrected rsync args + - name: Sync Changed Files via SFTP + uses: easingthemes/ssh-deploy@v5.1.0 + with: + SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} + REMOTE_HOST: '157.245.101.206' + REMOTE_USER: 'root' + SOURCE: 'resources/views/form' # 👈 Removed trailing slash + TARGET: '/var/www/rapport/resources/views/' # 👈 Point to parent folder + ARGS: '-rlgodivzc' # 👈 Fixed: changed to lowercase verbose mode, removed capital V \ No newline at end of file