infra: fix deploy.sh to use dynamic gh user (no hardcoded username)
This commit is contained in:
parent
ef9fe52f69
commit
5f730762c6
@ -12,10 +12,11 @@ git push origin main
|
|||||||
|
|
||||||
echo "[deploy] Pulling on ${REMOTE}..."
|
echo "[deploy] Pulling on ${REMOTE}..."
|
||||||
GH_TOKEN=$(gh auth token)
|
GH_TOKEN=$(gh auth token)
|
||||||
|
GH_USER=$(gh api user --jq .login)
|
||||||
ssh ${REMOTE} "cd ${APP_DIR} && \
|
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 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 && \
|
npm install --omit=dev --silent && \
|
||||||
pm2 restart peercortex"
|
pm2 restart peercortex"
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user