personalpage/.github/workflows/main.yml

19 lines
615 B
YAML
Raw Normal View History

2024-01-25 08:32:12 +07:00
on:
push:
branches:
- main
workflow_dispatch:
jobs:
run_pull:
name: run pull
runs-on: ubuntu-latest
steps:
- name: install ssh keys
# check this thread to understand why its needed:
# https://stackoverflow.com/a/70447517
2024-02-15 11:25:35 +07:00
run: install -m 600 -D /dev/null ~/.ssh/id_rsa && echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa && ssh-keyscan -H ${{ secrets.SSH_HOST }}
2024-01-25 08:59:43 +07:00
- name: connect and pull
2024-02-15 11:26:55 +07:00
run: ssh fikyb-ssh@103.241.205.253 "cd /home/fikyb-ssh/htdocs/fikyb.my.id && git checkout main && git pull && exit"
2024-01-25 08:59:43 +07:00
- name: cleanup
run: rm -rf ~/.ssh