tes dong
This commit is contained in:
parent
b17f0c1410
commit
7de11bbea6
18
.github/workflows/main.yml
vendored
18
.github/workflows/main.yml
vendored
|
@ -8,18 +8,16 @@ jobs:
|
|||
run_pull:
|
||||
name: run pull
|
||||
runs-on: ubuntu-latest
|
||||
environment: ssh_key
|
||||
|
||||
steps:
|
||||
- name: install ssh keys
|
||||
# check this thread to understand why its needed:
|
||||
# https://stackoverflow.com/a/70447517
|
||||
run: |
|
||||
echo "${{ secrets.SSH_HOST }}"
|
||||
echo '${{ secrets.SSH_USER }}'
|
||||
echo ${{ vars.WORK_DIR }}
|
||||
|
||||
# ssh-keyscan -H ${{ env.SSH_HOST }} > ~/.ssh/known_hosts
|
||||
# - name: connect and pull
|
||||
# run: ssh ${{ env.SSH_USER }}@${{ env.SSH_HOST }} "cd ${{ env.WORK_DIR }} && git checkout ${{ env.MAIN_BRANCH }} && git pull && exit"
|
||||
# - name: cleanup
|
||||
# run: rm -rf ~/.ssh
|
||||
install -m 600 -D /dev/null ~/.ssh/id_rsa
|
||||
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
|
||||
ssh-keyscan -H ${{ secrets.SSH_HOST }} > ~/.ssh/known_hosts
|
||||
- name: connect and pull
|
||||
run: ssh ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} "cd ${{ vars.WORK_DIR }} && git checkout main && git pull && exit"
|
||||
- name: cleanup
|
||||
run: rm -rf ~/.ssh
|
Loading…
Reference in New Issue
Block a user