In this final post I'll be writing up how everything fits together. As a recap, here are the steps I go through to create and publish a new post
Create Post
- Create
.mdfor my new post - write my words
- edit post
- Change
statusfromdrafttopublished
Publish Post
- Run
make htmlto generate the SQLite database that powers my site's search tool1 - Run
make vercelto deploy the SQLite database to vercel - Run
git add <filename>to add post to be committed to GitHub - Run
git commit -m <message>to commit to GitHub - Post to Twitter with a link to my new post
My previous posts have gone over how each step was automated, but now we'll 'throw it all together'.
I updated my Makefile with a new command:
tweet:
./tweet.sh
When I run make tweet it will calls tweet.sh. I wrote about the tweet.sh file in Auto Generating the Commit Message so I won't go deeply into here. What it does is automate steps 1 - 5 above for the Publish Post section above.
And that's it really. I've now been able to automate the file creation and publish process.
Admittedly these are the 'easy' parts. The hard part is the actual writing, but it does remove a ton pf potential friction from my workflow and this will hopefully lead to more writing this year.
make vercelactually runsmake htmlso this isn't really a step that I need to do. ↩︎
This post is part 5 of the "Auto Deploying my Words" series: