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: # -----------------------------------------------------------------