From 23e17dd0c9bd1b48eae97b7a94f7f591ecec4f1a Mon Sep 17 00:00:00 2001 From: AbhilashKD <124042593+AbhilashKD@users.noreply.github.com> Date: Mon, 15 Jul 2024 12:47:02 +0530 Subject: [PATCH] Create tekdi-server-deployment.yaml --- .../workflows/tekdi-server-deployment.yaml | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/tekdi-server-deployment.yaml diff --git a/.github/workflows/tekdi-server-deployment.yaml b/.github/workflows/tekdi-server-deployment.yaml new file mode 100644 index 00000000..3cc74e7d --- /dev/null +++ b/.github/workflows/tekdi-server-deployment.yaml @@ -0,0 +1,27 @@ +name: Deploy to Tekdi-QA Server +on: + pull_request: + types: [closed] + branches: + - release-1.0.0 +jobs: + deploy: + if: github.event.pull_request.merged == true + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - name: Deploy Stack + uses: appleboy/ssh-action@master + with: + host: ${{ secrets.HOST_NAME_TEKDI_QA }} + username: ${{ secrets.USERNAME_TEKDI_QA }} + key: ${{ secrets.EC2_SSH_KEY_TEKDI_QA }} + port: ${{ secrets.PORT_TEKDI_QA }} + script: | + cd ${{ secrets.TARGET_DIR_TEKDI_QA }} + if [ -f .env ]; then + rm .env + fi + echo "${{ secrets.QA_ENV }}" > .env + ls -ltra + ./deploy.sh