diff --git a/scripts/cicd.sh b/scripts/cicd.sh index 48b37e6..e24a729 100755 --- a/scripts/cicd.sh +++ b/scripts/cicd.sh @@ -1,7 +1,15 @@ #!/bin/bash +# Make sure we are in the correct directory cd /home/techcoordi/noticeboard || exit 1 -git pull origin main + +# Sync with remote repository +git fetch origin +git reset --hard origin/main + +# Build Stage sudo docker build -t proffapt/noticeboard . + +# Deploy Stage sudo docker-compose down sudo docker-compose up -d