ci(web): limpar .next antes do build para evitar EACCES de builds anteriores

This commit is contained in:
Esdras Renan 2025-10-09 18:02:26 -03:00
parent 8efa574b76
commit 51908ac14f

View file

@ -147,6 +147,16 @@ jobs:
cp -f "$DEFAULT_DIR/.env" "$EFFECTIVE_APP_DIR/.env" cp -f "$DEFAULT_DIR/.env" "$EFFECTIVE_APP_DIR/.env"
fi fi
- name: Clean Next.js cache (.next) to avoid EACCES
run: |
cd "$EFFECTIVE_APP_DIR"
if [ -e .next ]; then
echo "Removing existing .next (may be root-owned from previous container)"
rm -rf .next || (mv .next ".next.old.$(date +%s)" || true)
fi
mkdir -p .next
chmod -R u+rwX .next || true
- name: Install and build (Next.js) - name: Install and build (Next.js)
run: | run: |
cd "$EFFECTIVE_APP_DIR" cd "$EFFECTIVE_APP_DIR"