Update .gitea/workflows/deploy.yml
Some checks failed
Deploy Workshop-Wahlen (DEV / PROD) / deploy (push) Failing after 1m5s
Some checks failed
Deploy Workshop-Wahlen (DEV / PROD) / deploy (push) Failing after 1m5s
This commit is contained in:
@@ -13,33 +13,53 @@ jobs:
|
|||||||
container:
|
container:
|
||||||
image: docker.gitea.com/runner-images:ubuntu-latest
|
image: docker.gitea.com/runner-images:ubuntu-latest
|
||||||
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
# =====================
|
||||||
|
# CHECKOUT
|
||||||
|
# =====================
|
||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
# DEV
|
# =====================
|
||||||
- name: Deploy to DEV
|
# OPTIONAL DEBUG (kannst du später löschen)
|
||||||
if: github.ref == 'refs/heads/develop'
|
# =====================
|
||||||
uses: appleboy/scp-action@v0.1.7
|
- name: Debug workspace
|
||||||
with:
|
run: |
|
||||||
host: ${{ secrets.SFTP_HOST }}
|
echo "Working directory:"
|
||||||
port: ${{ secrets.SFTP_PORT }}
|
pwd
|
||||||
username: ${{ secrets.SFTP_USER }}
|
echo "Files:"
|
||||||
password: ${{ secrets.SFTP_PASS }}
|
ls -la
|
||||||
source: ./
|
|
||||||
target: "/dev.konfi-castle.com/wp-content/plugins/konficastle-workshopwahl/"
|
|
||||||
rm: true
|
|
||||||
|
|
||||||
# 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'
|
if: github.ref == 'refs/heads/main'
|
||||||
uses: appleboy/scp-action@v0.1.7
|
run: |
|
||||||
with:
|
apt-get update
|
||||||
host: ${{ secrets.SFTP_HOST }}
|
apt-get install -y lftp
|
||||||
port: ${{ secrets.SFTP_PORT }}
|
|
||||||
username: ${{ secrets.SFTP_USER }}
|
lftp -u "${{ secrets.SFTP_USER }},${{ secrets.SFTP_PASS }}" sftp://${{ secrets.SFTP_HOST }}:${{ secrets.SFTP_PORT }} <<EOF
|
||||||
password: ${{ secrets.SFTP_PASS }}
|
set sftp:auto-confirm yes
|
||||||
source: ./
|
set net:timeout 20
|
||||||
target: "/httpdocs/wp-content/plugins/konficastle-workshopwahl/"
|
set net:max-retries 2
|
||||||
rm: true
|
mirror -R --delete --verbose ./ /httpdocs/wp-content/plugins/konficastle-workshopwahl/
|
||||||
|
quit
|
||||||
|
EOF
|
||||||
|
|||||||
Reference in New Issue
Block a user