fix: CI always pulls latest before fallback to local repo
The actions/checkout fails (Gitea token issue) and falls back to ~/archy local copy. But local copy was stale — builds were missing fixes. Now: always git pull in local repo before rsync fallback. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
4820995bfb
commit
aa957d0e87
@ -15,6 +15,19 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
clean: true
|
clean: true
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
|
- name: Sync from local repo (fallback when checkout fails)
|
||||||
|
run: |
|
||||||
|
# Always pull latest in local repo so fallback is current
|
||||||
|
cd /home/archipelago/archy && git pull origin main 2>/dev/null || true
|
||||||
|
# If checkout failed (no .git), copy from local repo
|
||||||
|
if [ ! -d ".git" ] || [ ! -f "core/archipelago/Cargo.toml" ]; then
|
||||||
|
echo "Checkout failed — syncing from local repo"
|
||||||
|
rsync -a --delete --exclude='.git' --exclude='target/' --exclude='node_modules/' \
|
||||||
|
/home/archipelago/archy/ ./ 2>/dev/null || cp -a /home/archipelago/archy/* . 2>/dev/null
|
||||||
|
fi
|
||||||
|
echo "Source version: $(grep '^version' core/archipelago/Cargo.toml 2>/dev/null)"
|
||||||
|
|
||||||
- name: Build backend
|
- name: Build backend
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user