Switch master deploy to FTP
Deploy to Development and Production / deploy (push) Failing after 7s
Details
Deploy to Development and Production / deploy (push) Failing after 7s
Details
This commit is contained in:
parent
7cbb17594e
commit
c0462c911a
|
|
@ -38,14 +38,28 @@ jobs:
|
||||||
${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:${{ secrets.TARGET_DIR }}
|
${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:${{ secrets.TARGET_DIR }}
|
||||||
|
|
||||||
# 4. KORAK ZA MASTER: Izvede se samo, če je veja 'master'
|
# 4. KORAK ZA MASTER: Izvede se samo, če je veja 'master'
|
||||||
- name: Deploy to Production Server
|
- name: Install lftp (master only)
|
||||||
|
if: gitea.ref_name == 'master'
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y lftp
|
||||||
|
|
||||||
|
- name: Deploy to Production Server (FTP)
|
||||||
if: gitea.ref_name == 'master'
|
if: gitea.ref_name == 'master'
|
||||||
run: |
|
run: |
|
||||||
echo "🚀 Deploying to Production..."
|
echo "🚀 Deploying to Production..."
|
||||||
rsync -avz --delete \
|
lftp -c "
|
||||||
--exclude=".git/" \
|
set ftp:ssl-allow no
|
||||||
--exclude=".gitea/" \
|
set ftp:passive-mode yes
|
||||||
--exclude=".gitignore" \
|
open -u ${FTP_USER},${FTP_PASS} ${FTP_HOST}
|
||||||
-e "ssh -p ${{ secrets.SSH_PORT }} -i ~/.ssh/id_rsa -o StrictHostKeyChecking=no" \
|
mirror -R --delete --verbose \
|
||||||
./ \
|
--exclude-glob .git/ \
|
||||||
${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:${{ secrets.TARGET_MASTER_DIR }}
|
--exclude-glob .gitea/ \
|
||||||
|
--exclude-glob .gitignore \
|
||||||
|
./ ${TARGET_MASTER_DIR}
|
||||||
|
"
|
||||||
|
env:
|
||||||
|
FTP_HOST: ${{ secrets.FTP_HOST }}
|
||||||
|
FTP_USER: ${{ secrets.FTP_USER }}
|
||||||
|
FTP_PASS: ${{ secrets.FTP_PASS }}
|
||||||
|
TARGET_MASTER_DIR: ${{ secrets.TARGET_MASTER_DIR }}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue