blender-open-data/deploy.sh
Francesco Siddi 0515845e27 Deploy: Update deploy.sh
- Add automatic rebase for production deployment
- Use bash instead of sh
2024-02-25 16:02:47 +01:00

21 lines
356 B
Bash
Executable File

#!/bin/bash -ex
ENVIRONMENT=$1
if [ -z "$ENVIRONMENT" ]
then
echo "Usage: ./deploy.sh staging|production"
exit 1
fi
if [ "$ENVIRONMENT" = "production" ]
then
git fetch origin main:production && git push origin production
fi
pushd playbooks
source .venv/bin/activate
./ansible.sh -i environments/$ENVIRONMENT deploy.yaml
deactivate
popd