From e2e58bf59f603bc0fb900ae37763fed532df7a71 Mon Sep 17 00:00:00 2001 From: Loofra <32786211+yybht155@users.noreply.github.com> Date: Tue, 6 Aug 2024 17:39:07 +0800 Subject: [PATCH] Update build-push.yml --- .github/workflows/build-push.yml | 37 ++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-push.yml b/.github/workflows/build-push.yml index d62698b9942203..dc261f1f734d3f 100644 --- a/.github/workflows/build-push.yml +++ b/.github/workflows/build-push.yml @@ -61,10 +61,10 @@ jobs: # cache-from: type=gha # cache-to: type=gha,mode=max - depoly-jp: - runs-on: ubuntu-latest + # depoly-jp: + # runs-on: ubuntu-latest # needs: build-and-push - steps: + # steps: # - name: Release Images # run: | # curl -H "Authorization: Bearer ${{ secrets.UPDATE_DIFY_JP_TOKEN }}" ${{ secrets.UPDATE_DIFY_JP }} @@ -72,11 +72,26 @@ jobs: # run: | # echo ${{ secrets.PKEY }} > deploy.key # ssh -i deploy.key -o StrictHostKeyChecking=no ${{ secrets.DEPLOY }}@${{ secrets.ENDPOINT }} "pwd && echo 'test' > test.txt" - - name: executing remote ssh commands using password - uses: appleboy/ssh-action@v1.0.3 - with: - host: ${{ secrets.ENDPOINT }} - username: ${{ secrets.DEPLOY }} - key: ${{ secrets.PKEY }} - port: 22 - script: whoami + deploy: + name: "Deploy to staging" + runs-on: ubuntu-latest + steps: + - name: Configure SSH + run: | + mkdir -p ~/.ssh/ + echo "$SSH_KEY" > ~/.ssh/staging.key + chmod 600 ~/.ssh/staging.key + cat >>~/.ssh/config <