automating obsidian to github pages
i turned my local obsidian notes into a fully automated publishing pipeline. here’s how i did it.
goals
- write notes in obsidian
- sync them into my hugo site directory
- build static pages, commit, and push to gitHub
- publish automatically using github pages
architecture overview

the deployment script
created a script so that one command handles everything:
- validates paths and required commands ( sync, hugo, git).
- uses sync –delete to mirror obsidian posts into content/posts.
- runs hugo –minify to build the site.
- pushes main to github repository via ssh.
- publishes the public/ directory by pushing a
gh-pagesbranch via git subtree split.
github setup
- created the repository under my account and configured ssh access.
- pushed the hugo source to main.
- enabled github pages on the
gh-pagesbranch.
result
running the script now syncs whatever I write in obsidian, rebuilds the hugo site, pushes the commits, and republishes github pages instantly.