Rapport-Laravel/.gitea/workflows/ftp_deploy.yml/ftp_deploy.yml

30 lines
1.0 KiB
YAML

name: Specific Folder FTP Upload
on:
push:
branches:
- main # Change this if your default branch is master
paths:
- 'resources/views/form/**' # 👈 CHANGE THIS to your folder name
jobs:
ftp-deploy:
runs-on: ubuntu-latest
steps:
# 1. Checkout the code
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 2 # Fetches the current and previous commit to calculate differences
# 2. Extract and Upload only the changed files
- name: Sync Changed Files via SFTP
uses: nwtgck/actions-sftp-deploy@v1.2.2
with:
server: ${{ secrets.FTP_SERVER }}
username: ${{ secrets.FTP_USERNAME }}
password: ${{ secrets.FTP_PASSWORD }}
port: 22
# Only sync the files within your specific folder
local-dir: ./resources/views/form/ # 👈 CHANGE THIS to match your folder
server-dir: /var/www/rapport/resources/views/form/ # 👈 CHANGE THIS to your remote FTP path