vim .push_hugo.sh
i 進入編輯狀態,並將以下內容複製貼上#!/bin/bash
cd {HUGO_FOLDER_PATH}
hugo
cd public
git add --all
commitMsg="update at $(date +'%r') #deploy"
git commit -m "$commitMsg"
git push
esc 離開編輯狀態,並 :wq 儲存離開chmod +x .push_hugo.sh 讓該檔案可以執行./.push_hugo.sh 執行該檔案