All checks were successful
Deploy Workshop-Wahlen (DEV / PROD) / deploy (push) Successful in 14s
68 lines
1.8 KiB
YAML
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
|