fix: replace actions/checkout with direct git fetch+rsync (no more red cross)

actions/checkout@v4 uses a broken Gitea-generated token that always
fails. Replaced with direct git fetch+reset on the local repo, then
rsync to workspace. No more stale builds. Verified with version check.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Dorian 2026-04-02 20:38:52 +01:00
parent 69f52f7260
commit 37f5790165

View File

@ -11,22 +11,19 @@ jobs:
timeout-minutes: 45
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
clean: true
continue-on-error: true
- name: Sync from local repo (always — checkout token is unreliable)
run: |
# Pull latest into local repo
cd /home/archipelago/archy && git pull origin main 2>/dev/null || true
# Always sync from local repo to ensure latest code
echo "Syncing workspace from local repo..."
# Direct clone using stored credentials (actions/checkout token is broken)
cd /home/archipelago/archy && git fetch origin main && git reset --hard origin/main
echo "=== Source at commit: $(git log --oneline -1) ==="
echo "=== Syncing to workspace ==="
rsync -a --delete --exclude='.git' --exclude='target/' --exclude='node_modules/' \
/home/archipelago/archy/ ./ 2>/dev/null || cp -a /home/archipelago/archy/* . 2>/dev/null || true
echo "Source version: $(grep '^version' core/archipelago/Cargo.toml 2>/dev/null)"
echo "Latest commit: $(cd /home/archipelago/archy && git log --oneline -1 2>/dev/null)"
/home/archipelago/archy/ "$GITHUB_WORKSPACE/" || cp -a /home/archipelago/archy/* "$GITHUB_WORKSPACE/"
cd "$GITHUB_WORKSPACE"
echo "=== Workspace version: $(grep '^version' core/archipelago/Cargo.toml) ==="
echo "=== Key files ==="
echo " first-boot: $([ -f scripts/first-boot-containers.sh ] && echo PRESENT || echo MISSING)"
echo " Cargo.toml: $(grep '^version' core/archipelago/Cargo.toml)"
echo " package.json: $(grep '\"version\"' neode-ui/package.json | head -1)"
- name: Build backend
run: |