From ca1a9242f80251e6f52c38e3bac86fc9b6003936 Mon Sep 17 00:00:00 2001 From: Florent Poinsard Date: Tue, 19 Dec 2023 11:21:30 +0100 Subject: [PATCH 1/4] use proper SSH options Signed-off-by: Florent Poinsard --- .github/workflows/deploy.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index ed4b8ac..25a256e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -3,7 +3,7 @@ name: Deploy on: push: branches: - - main + - better-deploy jobs: deploy: @@ -14,10 +14,12 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: 1.20.6 + go-version: 1.21.5 - name: executing remote ssh commands using password uses: appleboy/ssh-action@master + env: + SSH_OPTIONS: "-tt" with: host: ${{ secrets.HOST }} username: ${{ secrets.USERNAME }} From dd402c60724352e9d3fcfa60b752a2b89a6970b5 Mon Sep 17 00:00:00 2001 From: Florent Poinsard Date: Tue, 19 Dec 2023 15:20:42 +0100 Subject: [PATCH 2/4] test option Signed-off-by: Florent Poinsard --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 25a256e..4bfc72d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -19,7 +19,7 @@ jobs: - name: executing remote ssh commands using password uses: appleboy/ssh-action@master env: - SSH_OPTIONS: "-tt" + SSH_OPTIONS: "test" with: host: ${{ secrets.HOST }} username: ${{ secrets.USERNAME }} From 2739a7e554cefea51f7ac326b24ebd39d50530e5 Mon Sep 17 00:00:00 2001 From: Florent Poinsard Date: Tue, 19 Dec 2023 15:27:36 +0100 Subject: [PATCH 3/4] use another marketplace action to do SSH Signed-off-by: Florent Poinsard --- .github/workflows/deploy.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 4bfc72d..70b612c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -17,15 +17,14 @@ jobs: go-version: 1.21.5 - name: executing remote ssh commands using password - uses: appleboy/ssh-action@master - env: - SSH_OPTIONS: "test" + uses: fifsky/ssh-action@master with: host: ${{ secrets.HOST }} - username: ${{ secrets.USERNAME }} key: ${{ secrets.KEY }} + user: ${{ secrets.USERNAME }} port: ${{ secrets.PORT }} - script: | + args: "-tt" + command: | cd $HOME/vitess-bot git reset --hard FETCH_HEAD git clean -fd @@ -34,4 +33,4 @@ jobs: killall -9 vitess-bot source ~/.profile go build -o vitess-bot ./go - nohup ./vitess-bot & \ No newline at end of file + nohup ./vitess-bot & From 38122147c4d192353f96166bf94d3af0e8c84430 Mon Sep 17 00:00:00 2001 From: Florent Poinsard Date: Tue, 19 Dec 2023 15:28:52 +0100 Subject: [PATCH 4/4] use the workflow only during push on the main branch Signed-off-by: Florent Poinsard --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 70b612c..5a09d17 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -3,7 +3,7 @@ name: Deploy on: push: branches: - - better-deploy + - main jobs: deploy: