The maybe factor?
This commit is contained in:
parent
c50b4e3f68
commit
984148f633
1 changed files with 10 additions and 15 deletions
25
.github/workflows/main.yml
vendored
25
.github/workflows/main.yml
vendored
|
|
@ -5,20 +5,15 @@ on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run_pull:
|
build:
|
||||||
name: run pull
|
name: Build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: install ssh keys
|
- name: executing remote ssh commands using password
|
||||||
# check this thread to understand why its needed:
|
uses: appleboy/ssh-action@v0.1.7
|
||||||
# https://stackoverflow.com/a/70447517
|
with:
|
||||||
run: |
|
host: ${{ secrets.SSH_HOST }}
|
||||||
install -m 600 -D /dev/null ~/.ssh/id_rsa
|
username: ${{ secrets.SSH_USER }}
|
||||||
chmod 600 ~/.ssh/id_rsa
|
password: ${{ secrets.SSH_PASSWORD }}
|
||||||
chmod 700 ~/.ssh
|
port: 22
|
||||||
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
|
script: "cd /etc/BotYam && git pull && docker-compose up -d --build"
|
||||||
ssh-keyscan -H ${{ secrets.SSH_HOST }} > ~/.ssh/known_hosts
|
|
||||||
ssh -oHostKeyAlgorithms=ssh-rsa ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} "cd ${{ secrets.WORK_DIR }} && git pull && docker-compose up -d --build && exit"
|
|
||||||
- name: cleanup
|
|
||||||
run: rm -rf ~/.ssh
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue