bcomnes / deploy-to-neocities

🐈 Github Action to deploy a folder to Neocities
https://github.com/marketplace/actions/deploy-to-neocities
MIT License
177 stars 15 forks source link

Workflow failing to upload. #172

Closed DuendeInexistente closed 7 months ago

DuendeInexistente commented 9 months ago
Starting diffing stage...
Finished diffing stage.
Starting applying stage...
Stage applying: 0.00% (0 B / 38.[9](https://github.com/DuendeInexistente/neocities/actions/runs/7732281628/job/21081879363#step:3:10) MB)
Finished error stage.
_ErrorWithCause: Error uploading files
Files to upload: 
    at NeocitiesAPIClient.deploy (/home/runner/work/_actions/bcomnes/deploy-to-neocities/v1/dist/index.js:36435:32)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async doDeploy (/home/runner/work/_actions/bcomnes/deploy-to-neocities/v1/dist/index.js:38232:17)
caused by: _ErrorWithCause: Neocities API error
    at NeocitiesAPIClient.batchPost (/home/runner/work/_actions/bcomnes/deploy-to-neocities/v1/dist/index.js:36308:34)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Promise.all (index 0)
    at async NeocitiesAPIClient.deploy (/home/runner/work/_actions/bcomnes/deploy-to-neocities/v1/dist/index.js:36433:[11](https://github.com/DuendeInexistente/neocities/actions/runs/7732281628/job/21081879363#step:3:12))
    at async doDeploy (/home/runner/work/_actions/bcomnes/deploy-to-neocities/v1/dist/index.js:38232:17)
caused by: JSONHTTPError: Bad Request
    at handleResponse (/home/runner/work/_actions/bcomnes/deploy-to-neocities/v1/dist/index.js:17901:40)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async NeocitiesAPIClient.batchPost (/home/runner/work/_actions/bcomnes/deploy-to-neocities/v1/dist/index.js:36305:28)
    at async Promise.all (index 0)
    at async NeocitiesAPIClient.deploy (/home/runner/work/_actions/bcomnes/deploy-to-neocities/v1/dist/index.js:36433:11)
    at async doDeploy (/home/runner/work/_actions/bcomnes/deploy-to-neocities/v1/dist/index.js:38232:[17](https://github.com/DuendeInexistente/neocities/actions/runs/7732281628/job/21081879363#step:3:18))
bcomnes commented 9 months ago

Do you have a reproduction I can test with?

bcomnes commented 9 months ago

Been a long running issue. There aren't any guardrails to keep rejected file types out of the upload job right now. The only workaround is to ignore bad files or keep them out of your deploy folder.

DuendeInexistente commented 9 months ago

Do you have a reproduction I can test with?

https://github.com/DuendeInexistente/neocities/tree/5f2d35e241fd04cc8a048c58264c5d42e0ea0113

This commit has the failure, if that's what you're asking for.

bcomnes commented 9 months ago

I'll try to take a look but in the meantime, try removing suspect files that the neocities upload API might reject (large binaries, shell scripts maybe? dot prefixed files? I can't recall the specifics here off hand). The current action API assumes you are deploying a folder of neocities safe files.

DuendeInexistente commented 9 months ago

Oh, that makes sense, I assumed those files would be just bounced back like with the regular neocities api client. There's a lot of misc workfiles I left in place.