ci(web): limpar .next antes do build para evitar EACCES de builds anteriores
This commit is contained in:
parent
8efa574b76
commit
51908ac14f
1 changed files with 10 additions and 0 deletions
10
.github/workflows/ci-cd-web-desktop.yml
vendored
10
.github/workflows/ci-cd-web-desktop.yml
vendored
|
|
@ -147,6 +147,16 @@ jobs:
|
|||
cp -f "$DEFAULT_DIR/.env" "$EFFECTIVE_APP_DIR/.env"
|
||||
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)
|
||||
run: |
|
||||
cd "$EFFECTIVE_APP_DIR"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue