Alternate titles:
- separate your writing from your coding with git sub modules
To Read
- Git Submodules Tutorial for Beginners: https://www.youtube.com/watch?v=gSlXo2iLBro
- How I organize my posting process: https://giuliachiola.dev/posts/blog-crossposting/
- Repository permissions and linking: https://docs.netlify.com/configure-builds/repo-permissions-linking/#git-submodules
- https://mayashavin.com/articles/github-actions-deploy-nuxt
- https://git-scm.com/docs/git-submodule
Read
- Using Git Submodules for Private Content: https://www.taniarascia.com/git-submodules-private-content/
GitHub
- Create blog repo (public or private)
- Create posts repo (private)
Blog repo
- Add posts repo as a submodule — steps?
git submodule add git@github.com:ooloth/content.git src/content
Posts repo
- Create a personal access token
- Add private access token to repo secrets
- Create a GitHub Actions workflow to publish posts changes to blog repo automatically
Netlify
- On blog site, add generate a deploy key
- On posts repo, save deploy key in Settings > Deploy keys
Publishing
My current process for updating the site looks like:
- Make changes to posts repo a. On iOS, I use Working Copy and sometimes iA Writer for a nicer writing experience b. On macOS, I use VS Code (with Alfred/Raycast ingtegration?)
- Commit + push changes to posts repo
- A GitHub Action workflow in my posts repo automatically pushes the changes to the blog repo
- Netlify notices the changes to the blog repo and deploys a new version