This commit is contained in:
Lucy Joshua 2023-02-25 02:17:08 +02:00 committed by GitHub
parent acc7c91bfb
commit 2ba379280a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -16,7 +16,7 @@ jobs:
run: | run: |
install -m 600 -D /dev/null ~/.ssh/id_rsa install -m 600 -D /dev/null ~/.ssh/id_rsa
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
ssh-keyscan -H ${{ secrets.SSH_HOST }} > ~/.ssh/known_hosts echo "${{ secrets.SSH_HOST }}" > ~/.ssh/known_hosts
- name: connect, pull, build and run - name: connect, pull, build and run
run: ssh ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} "cd ${{ secrets.WORK_DIR }} && git pull && docker-compose up -d --build && exit" run: ssh ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} "cd ${{ secrets.WORK_DIR }} && git pull && docker-compose up -d --build && exit"
- name: cleanup - name: cleanup