public-apis/build/deploy.sh
Dave Machado 367de578e6
Remove branch logic from deploy script
the branch logic lives in main.sh, so no need to check again
2018-01-02 13:14:48 -05:00

24 lines
432 B
Bash
Executable File

#!/bin/bash
set -o errexit -o nounset
rev=$(git rev-parse --short HEAD)
mkdir deploy
cd deploy
git init
git config --global user.name $GH_USER
git config --global user.email $GH_EMAIL
git remote add upstream "https://$GH_TOKEN@github.com/toddmotto/public-apis.git"
git fetch upstream
git reset upstream/master
mv ../../json .
git add json/
git commit -m "rebuild JSON at ${rev}" -m "[ci skip]"
git push upstream HEAD:master