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:
|
||||
|
||||
jobs:
|
||||
run_pull:
|
||||
name: run pull
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: install ssh keys
|
||||
# check this thread to understand why its needed:
|
||||
# https://stackoverflow.com/a/70447517
|
||||
run: |
|
||||
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
|
||||
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
|
||||
- name: executing remote ssh commands using password
|
||||
uses: appleboy/ssh-action@v0.1.7
|
||||
with:
|
||||
host: ${{ secrets.SSH_HOST }}
|
||||
username: ${{ secrets.SSH_USER }}
|
||||
password: ${{ secrets.SSH_PASSWORD }}
|
||||
port: 22
|
||||
script: "cd /etc/BotYam && git pull && docker-compose up -d --build"
|
||||
|
|
|
|||
Loading…
Reference in a new issue