git-scripts/hooks/post-receive

12 lines
656 B
Plaintext
Raw Permalink Normal View History

2019-06-01 00:17:28 +00:00
#!/usr/bin/env bash
# always deploys from the default (master) branch
mkdir -p '/srv/www/beta.therootcompany.com'
git --work-tree='/srv/www/beta.therootcompany.com' --git-dir='/srv/www-repos/rootprojects.org.git' checkout -f
echo "Deployed master to beta.therootcompany.com"
mkdir -p '/srv/www/beta.rootprojects.org'
git --work-tree='/srv/www/beta.rootprojects.org' --git-dir='/srv/www-repos/rootprojects.org.git' checkout -f
echo "Deployed master to beta.rootprojects.org"
git remote set-url upstream git@git.rootprojects.org:root/rootprojects.org.git >/dev/null
git push -u upstream master --force >/dev/null
git push -u upstream beta --force >/dev/null