This is my script in Python3:
The script is quite simple. It pulls the latest tweet from a specified twitter handle (easier than ID) and stores the json in the data directory of your hugo installation. My git server above is running the CD/CI and it is easy to integrate the script there. All I do is run this script as a cronjob all 5 minutes and does a commit and git fires up the post-receive hook, publishing my newest tweet or changes in likes, retweets (which is mostly 0 :P).
The script can also send you a mail when fetching fails. The downside is, it requires a twitter API key.