Give me a reason to be happy
This commit is contained in:
parent
46e279111f
commit
cdbe3a27d6
1 changed files with 2 additions and 1 deletions
3
.github/workflows/main.yml
vendored
3
.github/workflows/main.yml
vendored
|
|
@ -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"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue