ci: self-bootstrap repo (clone-if-absent) on fresh hosts

Deploy assumed the repo was pre-cloned at ~/<name>; clone it over HTTPS+token
if absent so a brand-new host self-assembles.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-05 02:18:39 +02:00
parent d0e039351a
commit b10c249b46
+1
View File
@@ -144,6 +144,7 @@ jobs:
envs: GAME_ID
script: |
docker login git.unom.io -u ${{ secrets.REGISTRY_USER }} -p ${{ secrets.REGISTRY_TOKEN }}
[ -d ~/${GAME_ID}/.git ] || git clone "https://${{ secrets.REGISTRY_USER }}:${{ secrets.REGISTRY_TOKEN }}@git.unom.io/played/${GAME_ID}.git" ~/${GAME_ID}
cd ~/${GAME_ID}
git fetch origin main
git reset --hard origin/main