Add more automation logic to the docs script.