develop #1
@@ -13,33 +13,53 @@ jobs:
|
||||
container:
|
||||
image: docker.gitea.com/runner-images:ubuntu-latest
|
||||
|
||||
|
||||
steps:
|
||||
# =====================
|
||||
# CHECKOUT
|
||||
# =====================
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# DEV
|
||||
- name: Deploy to DEV
|
||||
if: github.ref == 'refs/heads/develop'
|
||||
uses: appleboy/scp-action@v0.1.7
|
||||
with:
|
||||
host: ${{ secrets.SFTP_HOST }}
|
||||
port: ${{ secrets.SFTP_PORT }}
|
||||
username: ${{ secrets.SFTP_USER }}
|
||||
password: ${{ secrets.SFTP_PASS }}
|
||||
source: ./
|
||||
target: "/dev.konfi-castle.com/wp-content/plugins/konficastle-workshopwahl/"
|
||||
rm: true
|
||||
# =====================
|
||||
# OPTIONAL DEBUG (kannst du später löschen)
|
||||
# =====================
|
||||
- name: Debug workspace
|
||||
run: |
|
||||
echo "Working directory:"
|
||||
pwd
|
||||
echo "Files:"
|
||||
ls -la
|
||||
|
||||
# PROD
|
||||
- name: Deploy to PROD
|
||||
# =====================
|
||||
# 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'
|
||||
uses: appleboy/scp-action@v0.1.7
|
||||
with:
|
||||
host: ${{ secrets.SFTP_HOST }}
|
||||
port: ${{ secrets.SFTP_PORT }}
|
||||
username: ${{ secrets.SFTP_USER }}
|
||||
password: ${{ secrets.SFTP_PASS }}
|
||||
source: ./
|
||||
target: "/httpdocs/wp-content/plugins/konficastle-workshopwahl/"
|
||||
rm: true
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user