build failing for html/css build/deploy using github for workers

i have a simple html/css site im trying to deploy, but the build keeps failing and i only see the default "hello world". i have linked to my github repo, and it seemed that when building it was having trouble finding the index.html so i edited the deploy command to npx wrangler deploy ./index.html. but i still have the error and the build is failing:
Success: Finished initializing build environment
14:26:21.460 Cloning repository...
14:26:23.103 Detected the following tools from environment:
14:26:23.106 Executing user deploy command: npx wrangler deploy ./index.html
14:26:25.531 npm warn exec The following package was not found and will be installed: wrangler@4.20.0
14:26:37.514
14:26:37.514 ⛅️ wrangler 4.20.0
14:26:37.514 ───────────────────
14:26:37.538
14:26:37.619 ✘ [ERROR] Build failed with 1 error:
14:26:37.619
14:26:37.620 ✘ [ERROR] No loader is configured for ".html" files: index.html
14:26:37.620
14:26:37.620
14:26:37.620
14:26:37.620
14:26:37.620
14:26:37.638 :wood: Logs were written to "/opt/buildhome/.config/.wrangler/logs/wrangler-2025-06-14_21-26-36_691.log"
14:26:37.827 Failed: error occurred while running deploy command
Success: Finished initializing build environment
14:26:21.460 Cloning repository...
14:26:23.103 Detected the following tools from environment:
14:26:23.106 Executing user deploy command: npx wrangler deploy ./index.html
14:26:25.531 npm warn exec The following package was not found and will be installed: wrangler@4.20.0
14:26:37.514
14:26:37.514 ⛅️ wrangler 4.20.0
14:26:37.514 ───────────────────
14:26:37.538
14:26:37.619 ✘ [ERROR] Build failed with 1 error:
14:26:37.619
14:26:37.620 ✘ [ERROR] No loader is configured for ".html" files: index.html
14:26:37.620
14:26:37.620
14:26:37.620
14:26:37.620
14:26:37.620
14:26:37.638 :wood: Logs were written to "/opt/buildhome/.config/.wrangler/logs/wrangler-2025-06-14_21-26-36_691.log"
14:26:37.827 Failed: error occurred while running deploy command
2 Replies
olafg
olafg5mo ago
Hi, Afaik you can't deploy a html file like this, I think it needs to be JS
Razboy20
Razboy205mo ago
You can use a bare wrangler.jsonc with static asset handling to deploy a static html/css site, here is an example: https://github.com/Razboy20/deploy-cf-test
GitHub
GitHub - Razboy20/deploy-cf-test
Contribute to Razboy20/deploy-cf-test development by creating an account on GitHub.

Did you find this page helpful?