Some checks failed
Deploy Workshop-Wahlen (DEV / PROD) / deploy (push) Failing after 1m5s
66 lines
1.8 KiB
YAML
66 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
|
|
|
|
# =====================
|
|
# OPTIONAL DEBUG (kannst du später löschen)
|
|
# =====================
|
|
- name: Debug workspace
|
|
run: |
|
|
echo "Working directory:"
|
|
pwd
|
|
echo "Files:"
|
|
ls -la
|
|
|
|
# =====================
|
|
# DEV DEPLOY (SFTP)
|
|
# =====================
|
|
- name: Deploy to DEV via SFTP
|
|
if: github.ref == 'refs/heads/develop'
|
|
run: |
|
|
apt-get update
|
|
apt-get install -y lftp
|
|
|
|
lftp -u "${{ secrets.SFTP_USER }},${{ secrets.SFTP_PASS }}" sftp://${{ secrets.SFTP_HOST }}:${{ secrets.SFTP_PORT }} <<EOF
|
|
set sftp:auto-confirm yes
|
|
set net:timeout 20
|
|
set net:max-retries 2
|
|
mirror -R --delete --verbose ./ /dev.konfi-castle.com/wp-content/plugins/konficastle-workshopwahl/
|
|
quit
|
|
EOF
|
|
|
|
# =====================
|
|
# PROD DEPLOY (SFTP)
|
|
# =====================
|
|
- name: Deploy to PROD via SFTP
|
|
if: github.ref == 'refs/heads/main'
|
|
run: |
|
|
apt-get update
|
|
apt-get install -y lftp
|
|
|
|
lftp -u "${{ secrets.SFTP_USER }},${{ secrets.SFTP_PASS }}" sftp://${{ secrets.SFTP_HOST }}:${{ secrets.SFTP_PORT }} <<EOF
|
|
set sftp:auto-confirm yes
|
|
set net:timeout 20
|
|
set net:max-retries 2
|
|
mirror -R --delete --verbose ./ /httpdocs/wp-content/plugins/konficastle-workshopwahl/
|
|
quit
|
|
EOF
|