add script for generating and publishing the api docs to github

This commit is contained in:
Adam Cooke
2017-05-05 19:54:56 +01:00
parent 553aedf031
commit 88170af3cb
+21
View File
@@ -0,0 +1,21 @@
#!/bin/bash
set -e
if [ ! -d /tmp/postal-api/.git ];
then
git clone git@github.com:atech/postal-api /tmp/postal-api
else
git -C /tmp/postal-api pull origin master
git -C /tmp/postal-api reset --hard HEAD
fi
rm -Rf /tmp/postal-api/*
bundle exec moonrope api /tmp/postal-api
cd /tmp/postal-api
git add .
git commit -m "update docs"
git push origin master