From a6a1654a9a174f429925ba9ef17ac2ace600d590 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pascal=20Prie=C3=9Fnitz?= Date: Wed, 3 Dec 2025 00:08:51 +0100 Subject: [PATCH] added deploy.yml --- .gitea/deploy.yml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .gitea/deploy.yml diff --git a/.gitea/deploy.yml b/.gitea/deploy.yml new file mode 100644 index 0000000..b21dfbf --- /dev/null +++ b/.gitea/deploy.yml @@ -0,0 +1,39 @@ +name: Deploy Discord Bot + +on: + push: + branches: + - main + +jobs: + deploy: + # Muss zu deinem Runner-Label passen! + # Wenn du beim act_runner z.B. "ubuntu-latest" als Label eingetragen hast: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: https://github.com/actions/checkout@v4 + + - name: Check if commit message contains 'deploy' + id: check_deploy + run: | + MSG="${{ gitea.event.head_commit.message }}" + echo "Commit message: $MSG" + if echo "$MSG" | grep -iq "deploy"; then + echo "should_deploy=true" >> $GITEA_OUTPUT + else + echo "should_deploy=false" >> $GITEA_OUTPUT + fi + + - name: Stop if no deploy keyword + if: steps.check_deploy.outputs.should_deploy != 'true' + run: | + echo "No 'deploy' keyword in commit message. Skipping deployment." + exit 0 + + - name: Run deploy script on host + if: steps.check_deploy.outputs.should_deploy == 'true' + run: | + echo "Starte deploy.sh auf dem Docker-Host..." + /opt/Papo/deploy.sh