Updating This Blog with Atom
1 min read
•
May 16, 2019
• Mark A. McFate
So I have my Atom config stored in a Github repo so that I can easily keep Atom in-sync between the various platforms I use here and at home. Today I added the atom-shell-commands package to my Atom config and have configured it with a “command” that takes care of updating my blog when I add a new post (like this one).
The command configuration in my .atom/config.cson
looks like this:
"atom-shell-commands":
commands: [
{
name: "Update My Blog"
command: "./update-blog.sh"
options:
cwd: "{ProjectDir}"
keymap: 'ctrl-2'
save: "True"
}
]
The ./update-blog.sh
script referenced in the configuration contains:
#!/bin/bash
cd ~/Projects/blogs-McFateM
docker image build -t blog-update .
docker login
docker tag blog-update mcfatem/blogs-mcfatem:latest
docker push mcfatem/blogs-mcfatem:latest
If you’re reading this from my blog site then it must be working because I used the new command to push this content to the site!
And that’s a wrap. Until next time…