From 8f92e53fa8ece509852f3ba5694141635db424f4 Mon Sep 17 00:00:00 2001 From: Bjoern Runden Date: Mon, 3 Aug 2026 13:38:11 +0200 Subject: [PATCH] =?UTF-8?q?deploy-jed=C3=B6nse=20drin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/deploy.yml | 55 +++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .gitea/workflows/deploy.yml diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml new file mode 100644 index 0000000..e8f48a9 --- /dev/null +++ b/.gitea/workflows/deploy.yml @@ -0,0 +1,55 @@ +name: Formeleon Deployment Pipeline + +on: + push: + branches: + - main + - stable + +jobs: + # --------------------------------------------------- + # 1. DEPLOYMENT TO DEVELOPMENT (branch: main) + # --------------------------------------------------- + deploy-dev: + name: Deploy to Dev Environment + if: github.ref == 'refs/heads/main' + runs-on: ubuntu-latest + + steps: + - name: Deploy via SSH to Dev + uses: appleboy/ssh-action@v1 + with: + # Flexibel über "Settings -> Actions -> Variables" editierbar: + host: ${{ vars.DEV_HOST }} + username: ${{ vars.DEV_DEPLOY_USER }} + + # Passwörter/Keys weiterhin über "Secrets": + key: ${{ secrets.DEV_SSH_KEY }} + port: 22 + script: | + cd /opt/formeleon-dev + git pull origin main + docker compose down + docker compose up -d --build + + # --------------------------------------------------- + # 2. DEPLOYMENT TO PRODUCTION (branch: stable) + # --------------------------------------------------- + deploy-prod: + name: Deploy to Production Environment + if: github.ref == 'refs/heads/stable' + runs-on: ubuntu-latest + + steps: + - name: Deploy via SSH to Prod + uses: appleboy/ssh-action@v1 + with: + host: ${{ vars.PROD_HOST }} + username: ${{ vars.PROD_DEPLOY_USER }} + key: ${{ secrets.PROD_SSH_KEY }} + port: 22 + script: | + cd /opt/formeleon-prod + git pull origin stable + docker compose down + docker compose up -d --build \ No newline at end of file