Skip to content

Commit

Permalink
Update build-push.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
yybht155 authored Aug 6, 2024
1 parent 5452ebf commit e2e58bf
Showing 1 changed file with 26 additions and 11 deletions.
37 changes: 26 additions & 11 deletions .github/workflows/build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,22 +61,37 @@ 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 }}
# - name: Release Images
# 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/[email protected]
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 <<END
Host staging
HostName $SSH_HOST
User $SSH_USER
IdentityFile ~/.ssh/staging.key
StrictHostKeyChecking no
END
env:
SSH_USER: ${{ secrets.DEPLOY }}
SSH_KEY: ${{ secrets.PKEY }}
SSH_HOST: ${{ secrets.ENDPOINT }}

- name: Start the server
run: pwd

0 comments on commit e2e58bf

Please sign in to comment.