Root cause
This is a known issue listed in the Azure Static Web Apps CLI: Azure/static-web-apps-cli#514 (also see the troubleshooting doc).
- kubernetes workers use a network drive, not a local disk
swa deploy writes its scratch/deploy files relative to the current working directory
swa deploy treats all working directories like local disks even when they aren't
Errors / stacktrace
generic swa error may be seen unknown error has occured
Workaround
stage the build output on local disk (e.g. /tmp) before invoking swa, so it never touches the network-backed work directory:
STAGE=$(mktemp -d /tmp/swa-XXXXXX)
cp -a package/dist "$STAGE/dist"
cd "$STAGE" && swa deploy ./dist --deployment-token "$TOKEN" --env Production
Root cause
This is a known issue listed in the Azure Static Web Apps CLI: Azure/static-web-apps-cli#514 (also see the troubleshooting doc).
swa deploywrites its scratch/deploy files relative to the current working directoryswa deploytreats all working directories like local disks even when they aren'tErrors / stacktrace
generic swa error may be seen
unknown error has occuredWorkaround
stage the build output on local disk (e.g. /tmp) before invoking swa, so it never touches the network-backed work directory: