This commit is contained in:
2025-01-07 22:20:02 -05:00
parent c3ef3f2dd5
commit 14f9bb557d
5 changed files with 21 additions and 18 deletions

9
deploy.sh Normal file → Executable file
View File

@@ -1,9 +1,9 @@
#!/bin/bash
$rootdir=$(pwd)
$deploydir=$rootdir/deployments/$REPO/$BRANCH
deploydir=$DEPLOYERDIR/$REPO/$BRANCH
mkdir -p $deploydir
cd $deploydir
git clone $CLONE_URL .
git fetch origin $BRANCH
@@ -28,9 +28,10 @@ StandardError=file:$deploydir/server.log
[Install]
WantedBy=multi-user.target
" > deploy.service
systemctl daemon reload
systemctl daemon-reload
$service="deployer-$repo-$branch.service"
service="deployer-$REPO-$BRANCH.service"
echo /etc/systemd/system/$service
ln -s $deploydir/deploy.service /etc/systemd/system/$service
systemctl stop $service
systemctl start $service