Files
Workshop-Wahlen/.gitea/workflows/deploy.yml
Linus Maximilian Nilson 0faba96901
All checks were successful
Deploy Workshop-Wahlen (DEV / PROD) / deploy (push) Successful in 14s
Update .gitea/workflows/deploy.yml
2026-01-30 17:31:11 +00:00

68 lines
1.8 KiB
YAML

name: Deploy Workshop-Wahlen (DEV / PROD)
on:
push:
branches:
- develop
- main
jobs:
deploy:
runs-on: ubuntu-latest
container:
image: docker.gitea.com/runner-images:ubuntu-latest
steps:
# =====================
# CHECKOUT
# =====================
- name: Checkout Repository
uses: actions/checkout@v4
# =====================
# DEBUG (kann später raus)
# =====================
- name: Debug workspace
run: |
echo "PWD:"
pwd
echo "FILES:"
ls -la
# =====================
# DEV DEPLOY (FTP)
# =====================
- name: Deploy to DEV via FTP
if: github.ref == 'refs/heads/develop'
run: |
apt-get update
apt-get install -y lftp
lftp -u "${{ secrets.FTP_USER }},${{ secrets.FTP_PASS }}" ftp://${{ secrets.FTP_HOST }}:${{ secrets.FTP_PORT }} <<EOF
set ftp:ssl-allow no
set net:timeout 20
set net:max-retries 2
set mirror:parallel-transfer-count 2
mirror -R --delete --verbose ./ /dev.konfi-castle.com/wp-content/plugins/konficastle-workshopwahl/
quit
EOF
# =====================
# PROD DEPLOY (FTP)
# =====================
- name: Deploy to PROD via FTP
if: github.ref == 'refs/heads/main'
run: |
apt-get update
apt-get install -y lftp
lftp -u "${{ secrets.FTP_USER }},${{ secrets.FTP_PASS }}" ftp://${{ secrets.FTP_HOST }}:${{ secrets.FTP_PORT }} <<EOF
set ftp:ssl-allow no
set net:timeout 20
set net:max-retries 2
set mirror:parallel-transfer-count 2
mirror -R --delete --verbose ./ /httpdocs/wp-content/plugins/konficastle-workshopwahl/
quit
EOF