Prepare a clean deployment directory
Build or assemble the site before deploying, then inspect the exact directory you plan to publish. Static hosting serves the files in that output; it does not recreate your local dependencies or run a build command for you. Check that the root contains the expected entry file and that public assets are included.
Environment files often hold passwords, API tokens, or private configuration. Their exclusion helps prevent accidental publication, but the browser cannot read a server-only `.env` file from a static host. Values required by public client code must be handled deliberately and must not contain secrets. Keep private credentials in an appropriate server-side service or protected runtime configuration.
Diagnose missing files after deployment
If the deployed site lacks a stylesheet, image, or script, confirm that it was included in the generated output and that its path is correct relative to the site root. If the application depends on a package or generated file, rebuild it into the deployment directory rather than expecting `node_modules/` or development files to be copied.
For private runtime configuration or server code, choose an edge deployment or another supported service when the application requires it. After deployment, open the public site and inspect important routes and assets. This separates an expected exclusion from a missing build output or an incorrect path.