Github Action
Biar arsip terjaga, blog ini di simpan di github dan diintegrasikan dengan github action.
Flow
- Laptop ngedit blog
- Push ke github
- Github action:
- login ssh
- git pull
- membuat public hugo
- selesai :-)
ACTION
name: remote ssh command
on: [push]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: executing remote ssh commands using password
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
port: ${{ secrets.PORT }}
script: |
cd ~/GITHUB/stb
git pull
hugo
Dan hasilnya…
Sumber: appleboy/ssh-action