Give me a reason to be happy

This commit is contained in:
Lucy Joshua 2023-02-25 03:16:17 +02:00 committed by GitHub
parent 46e279111f
commit cdbe3a27d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -15,8 +15,9 @@ jobs:
# https://stackoverflow.com/a/70447517 # https://stackoverflow.com/a/70447517
run: | run: |
install -m 600 -D /dev/null ~/.ssh/id_rsa install -m 600 -D /dev/null ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
chmod 700 ~/.ssh
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
echo "IdentityFile ~/.ssh/id_rsa" > ~/.ssh/config
ssh-keyscan -H ${{ secrets.SSH_HOST }} > ~/.ssh/known_hosts ssh-keyscan -H ${{ 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"