personal-website/publish_blog.sh

23 lines
567 B
Bash
Executable File

#!/bin/bash
echo "Going to the openring folder..."
cd ../openring || exit
# Select 3 random feeds from the list and generate an openring structure from them
./openring $(shuf -n 3 feeds.txt | xargs printf -- '-s %s ') < in.html > out.html
sleep 3
echo "Copying the generated html file to my blog directory..."
cp out.html ../siddhartha-golu-website/layouts/partials/openring.html
echo "Going to the siddhartha-golu-website directory..."
cd ../siddhartha-golu-website || exit
hugo
git add .
git commit -m $1
echo "Pushing to production..."
git push
echo "Done!"