diff --git a/deploy/deploy.sh b/deploy/deploy.sh index 9964087..0235752 100755 --- a/deploy/deploy.sh +++ b/deploy/deploy.sh @@ -12,10 +12,11 @@ git push origin main echo "[deploy] Pulling on ${REMOTE}..." GH_TOKEN=$(gh auth token) +GH_USER=$(gh api user --jq .login) ssh ${REMOTE} "cd ${APP_DIR} && \ - git remote set-url origin https://renefichtmueller:${GH_TOKEN}@github.com/renefichtmueller/PeerCortex.git && \ + git remote set-url origin https://${GH_USER}:${GH_TOKEN}@github.com/${GH_USER}/PeerCortex.git && \ git pull origin main && \ - git remote set-url origin https://github.com/renefichtmueller/PeerCortex.git && \ + git remote set-url origin https://github.com/${GH_USER}/PeerCortex.git && \ npm install --omit=dev --silent && \ pm2 restart peercortex"