deploy script works

This commit is contained in:
2025-01-10 20:47:57 -05:00
parent 8680ab1fd4
commit c1007acca7
2 changed files with 7 additions and 5 deletions

4
.gitignore vendored
View File

@@ -1,7 +1,5 @@
**/__pycache__/*
venv/*
production/*
test*
logs/*
credentials.sh
deploy_key*
token

View File

@@ -4,7 +4,11 @@ deploydir=$DEPLOYERDIR/$REPO/$BRANCH
mkdir -p $deploydir/src
cd $deploydir
git clone -b $BRANCH "git@gitea:$USER/$REPO.git" ./src
git clone \
-b $BRANCH \
"http://deployer:$(cat /home/drm/deployer/token)@localhost:3000/$USER/$REPO" \
./src
cd src
git fetch origin $BRANCH
git reset --hard origin/$BRANCH
@@ -32,7 +36,7 @@ WantedBy=multi-user.target
" > deploy.service
service="deployer-$REPO-$BRANCH.service"
ln -s $deploydir/deploy.service /etc/systemd/system/$service
ln -sf $deploydir/deploy.service /etc/systemd/system/$service
sudo systemctl daemon-reload
systemctl stop $service