conference-website/deploy.sh
2024-08-09 15:29:00 +02:00

21 lines
359 B
Bash
Executable File

#!/bin/sh -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 shared/deploy.yaml
deactivate
popd