From 5054e1c9fbb80529a72e57f567b65341f0360380 Mon Sep 17 00:00:00 2001 From: mahdi Date: Mon, 20 Jul 2026 22:26:44 +0330 Subject: [PATCH] ci: add Gitea Actions workflow --- .gitea/workflows/deploy.yml | 26 ++++++++++++++++++++++++++ main.yml | 3 ++- 2 files changed, 28 insertions(+), 1 deletion(-) 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..97c32ae --- /dev/null +++ b/.gitea/workflows/deploy.yml @@ -0,0 +1,26 @@ +name: Production Deployment Pipeline + +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Check out repository code + uses: actions/checkout@v3 + + - name: Deploy Hello World Application + run: | + docker pull nginxdemos/hello:plain-text + docker compose -f ./stacks/hello-world/docker-compose.yml up -d + + - name: Send Telegram Notification + if: always() + run: | + curl -s -X POST "https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendMessage" \ + -d "chat_id=${{ secrets.TELEGRAM_CHAT_ID }}" \ + -d "parse_mode=Markdown" \ + -d "text=🚀 *Gitea Actions Deployment Completed!*%0A*Project:* ${{ gitea.repository }}%0A*Status:* Success" diff --git a/main.yml b/main.yml index 5e66ecd..2b8242c 100644 --- a/main.yml +++ b/main.yml @@ -34,7 +34,8 @@ - role: ../../ansible/roles/cicd-platform vars: # Options: gitlab-saas, gitea-selfhosted, gitlab-ce - cicd_provider: "gitlab-saas" + #cicd_provider: "gitlab-saas" + cicd_provider: "gitea-selfhosted" tasks: # -----------------------------------------------------------------