From 2f428a70b26da03c09259d423940c9deed125e30 Mon Sep 17 00:00:00 2001 From: Vivek Teega Date: Sat, 9 Dec 2023 13:58:29 +0530 Subject: [PATCH 01/12] Test --- .github/workflows/deploy-api.yml | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/.github/workflows/deploy-api.yml b/.github/workflows/deploy-api.yml index e4d05ca..88d6a9e 100644 --- a/.github/workflows/deploy-api.yml +++ b/.github/workflows/deploy-api.yml @@ -1,20 +1,15 @@ name: Pull changes and deploy API - on: [push] - jobs: build: - + name: Pull changes and deploy API runs-on: self-hosted - steps: - - uses: actions/checkout@v1 - - - name: Executing remote command - uses: appleboy/ssh-action@master + - name: executing remote ssh commands using password + uses: appleboy/ssh-action@v1.0.0 with: host: ${{ secrets.HOST }} - USERNAME: ${{ secrets.USERNAME }} - PORT: ${{ secrets.PORT }} - KEY: ${{ secrets.SSHKEY }} - script: ls \ No newline at end of file + username: ${{ secrets.USERNAME }} + password: ${{ secrets.PASSWORD }} + port: ${{ secrets.PORT }} + script: whoami \ No newline at end of file From 27919f3712278638ad63f50798d09fae7a2ed971 Mon Sep 17 00:00:00 2001 From: Vivek Teega Date: Sat, 9 Dec 2023 15:48:37 +0530 Subject: [PATCH 02/12] test --- .github/workflows/deploy-api.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy-api.yml b/.github/workflows/deploy-api.yml index 88d6a9e..e81aeb4 100644 --- a/.github/workflows/deploy-api.yml +++ b/.github/workflows/deploy-api.yml @@ -5,11 +5,13 @@ jobs: name: Pull changes and deploy API runs-on: self-hosted steps: - - name: executing remote ssh commands using password + - name: multiple command uses: appleboy/ssh-action@v1.0.0 with: host: ${{ secrets.HOST }} username: ${{ secrets.USERNAME }} - password: ${{ secrets.PASSWORD }} + key: ${{ secrets.KEY }} port: ${{ secrets.PORT }} - script: whoami \ No newline at end of file + script: | + whoami + ls -al \ No newline at end of file From ca4c7f5b6a7e8efbde4244cfabb5292e3aa1e751 Mon Sep 17 00:00:00 2001 From: Vivek Teega Date: Sat, 9 Dec 2023 15:54:17 +0530 Subject: [PATCH 03/12] test --- .github/workflows/deploy-api.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-api.yml b/.github/workflows/deploy-api.yml index e81aeb4..a48b81a 100644 --- a/.github/workflows/deploy-api.yml +++ b/.github/workflows/deploy-api.yml @@ -3,7 +3,7 @@ on: [push] jobs: build: name: Pull changes and deploy API - runs-on: self-hosted + runs-on: [ramanujam] steps: - name: multiple command uses: appleboy/ssh-action@v1.0.0 From d308c495f691d5b5cc72b7996c3bd60efd180219 Mon Sep 17 00:00:00 2001 From: Vivek Teega Date: Sat, 9 Dec 2023 16:12:25 +0530 Subject: [PATCH 04/12] test --- .github/workflows/deploy-api.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-api.yml b/.github/workflows/deploy-api.yml index a48b81a..e81aeb4 100644 --- a/.github/workflows/deploy-api.yml +++ b/.github/workflows/deploy-api.yml @@ -3,7 +3,7 @@ on: [push] jobs: build: name: Pull changes and deploy API - runs-on: [ramanujam] + runs-on: self-hosted steps: - name: multiple command uses: appleboy/ssh-action@v1.0.0 From fc97834a204c195b997aadeefe34fa3b61d16a40 Mon Sep 17 00:00:00 2001 From: Vivek Teega Date: Sat, 9 Dec 2023 16:33:11 +0530 Subject: [PATCH 05/12] test --- .github/workflows/deploy-api.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy-api.yml b/.github/workflows/deploy-api.yml index e81aeb4..58b2cf1 100644 --- a/.github/workflows/deploy-api.yml +++ b/.github/workflows/deploy-api.yml @@ -1,5 +1,6 @@ name: Pull changes and deploy API on: [push] + jobs: build: name: Pull changes and deploy API From eb249962df3aa3ff2d11195bbc6e12744f0f4164 Mon Sep 17 00:00:00 2001 From: Vivek Teega Date: Sat, 9 Dec 2023 16:48:36 +0530 Subject: [PATCH 06/12] test --- .github/workflows/deploy-api.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/deploy-api.yml b/.github/workflows/deploy-api.yml index 58b2cf1..e81aeb4 100644 --- a/.github/workflows/deploy-api.yml +++ b/.github/workflows/deploy-api.yml @@ -1,6 +1,5 @@ name: Pull changes and deploy API on: [push] - jobs: build: name: Pull changes and deploy API From dd197cdf24eca3cd54b1d9ca6bcc746176a38580 Mon Sep 17 00:00:00 2001 From: Vivek Teega Date: Sat, 9 Dec 2023 16:56:04 +0530 Subject: [PATCH 07/12] test --- .github/workflows/deploy-api.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy-api.yml b/.github/workflows/deploy-api.yml index e81aeb4..58b2cf1 100644 --- a/.github/workflows/deploy-api.yml +++ b/.github/workflows/deploy-api.yml @@ -1,5 +1,6 @@ name: Pull changes and deploy API on: [push] + jobs: build: name: Pull changes and deploy API From b485ad1fdeae54622dfb0e3f2cb9fbf3a52401a1 Mon Sep 17 00:00:00 2001 From: Vivek Teega Date: Sat, 16 Dec 2023 15:02:01 +0530 Subject: [PATCH 08/12] Update deploy-api.yml --- .github/workflows/deploy-api.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/deploy-api.yml b/.github/workflows/deploy-api.yml index 58b2cf1..f597729 100644 --- a/.github/workflows/deploy-api.yml +++ b/.github/workflows/deploy-api.yml @@ -1,18 +1,16 @@ name: Pull changes and deploy API on: [push] - jobs: + build: - name: Pull changes and deploy API + name: Build runs-on: self-hosted steps: - - name: multiple command + - name: Executing remote command uses: appleboy/ssh-action@v1.0.0 with: host: ${{ secrets.HOST }} username: ${{ secrets.USERNAME }} - key: ${{ secrets.KEY }} + password: ${{ secrets.PASSWORD }} port: ${{ secrets.PORT }} - script: | - whoami - ls -al \ No newline at end of file + script: whoami From 509697602684b93926222fc5a5f81c3026f8c2ec Mon Sep 17 00:00:00 2001 From: Vivek Teega Date: Sat, 16 Dec 2023 15:05:50 +0530 Subject: [PATCH 09/12] Update deploy-api.yml --- .github/workflows/deploy-api.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/deploy-api.yml b/.github/workflows/deploy-api.yml index f597729..90cada2 100644 --- a/.github/workflows/deploy-api.yml +++ b/.github/workflows/deploy-api.yml @@ -1,7 +1,6 @@ name: Pull changes and deploy API on: [push] jobs: - build: name: Build runs-on: self-hosted From 95856d1f26ffb7b26e915836010c3ef1508b8717 Mon Sep 17 00:00:00 2001 From: Vivek Teega Date: Sat, 16 Dec 2023 15:13:51 +0530 Subject: [PATCH 10/12] Update deploy-api.yml --- .github/workflows/deploy-api.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy-api.yml b/.github/workflows/deploy-api.yml index f597729..bce082b 100644 --- a/.github/workflows/deploy-api.yml +++ b/.github/workflows/deploy-api.yml @@ -13,4 +13,6 @@ jobs: username: ${{ secrets.USERNAME }} password: ${{ secrets.PASSWORD }} port: ${{ secrets.PORT }} - script: whoami + script: | + whoami + ls -al From f0b7331d698dc902af2b3844d8c583eb289aa7ac Mon Sep 17 00:00:00 2001 From: Vivek Teega Date: Sat, 16 Dec 2023 16:13:53 +0530 Subject: [PATCH 11/12] Update deploy-api.yml --- .github/workflows/deploy-api.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy-api.yml b/.github/workflows/deploy-api.yml index bce082b..95f4a74 100644 --- a/.github/workflows/deploy-api.yml +++ b/.github/workflows/deploy-api.yml @@ -1,7 +1,6 @@ name: Pull changes and deploy API on: [push] jobs: - build: name: Build runs-on: self-hosted @@ -14,5 +13,5 @@ jobs: password: ${{ secrets.PASSWORD }} port: ${{ secrets.PORT }} script: | - whoami - ls -al + cd /home/production/deployed/hasher && git pull + supervisorctl restart integrity-api From 94178903ae27f05e97d8a8b123e515b2e4245cdd Mon Sep 17 00:00:00 2001 From: Vivek Teega Date: Sat, 16 Dec 2023 16:21:20 +0530 Subject: [PATCH 12/12] Update deploy-api.yml --- .github/workflows/deploy-api.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-api.yml b/.github/workflows/deploy-api.yml index 95f4a74..d9ff200 100644 --- a/.github/workflows/deploy-api.yml +++ b/.github/workflows/deploy-api.yml @@ -13,5 +13,5 @@ jobs: password: ${{ secrets.PASSWORD }} port: ${{ secrets.PORT }} script: | - cd /home/production/deployed/hasher && git pull - supervisorctl restart integrity-api + cd ${{ secrets.APP_FOLDER }} && git pull + supervisorctl restart ${{ secrets.SUPERVISOR_SERVICE_NAME }}