Deployment failed via API
I did try to deploy:
`
Got this error:
24 Replies
As the error states, you'd need a manifest
We don't really recommend manual deployments, the deploy process isn't simple or documented.
How come you aren't doing
wrangler pages deploy
?I need to create the pages connected to git via remote (API)
The pages project is already created earlier and I need to trigger a deployment when I create it, not after I deploy to my github but only by creating it. I need to auto deploy it on creation.
Is this possible, because as of now I do first create it and then try to deploy it (like the code above).
I see, that error is for non-Git connected projects
For Git connected, that endpoint should indeed just trigger a new deploy
Are you making these as Git projects?
Would you need two different API calls in order to trigger a deploy or can I do it with some parameter on init?
Yes, these are all git repos
2 API calls yeah, make project -> trigger deploy
Got you
what's your API call to make the project
It is a Vite project with React.
huh weird, that is a git project

This is what I see after the creation process
And that shows as direct upload
Interesting..
Oh
You aren't passing source into projects.create()
oh really, let me check
?

Do you mean like this? It does not like source in there.
bleh, the sdk may be incorrectly rejecting source..
Error: 400 {"result":null,"success":false,"errors":[{"code":8000006,"message":"Request body is incorrect. The request body may have an invalid JSON type or missing required keys. Refer to https://developers.cloudflare.com/api."}],"messages":[]}
https://developers.cloudflare.com/api/resources/pages/subresources/projects/models/project/#(schema) the schema has it so i'm not sure why the sdk doesn't like it

Where is source?
i linked to

There yep
Any idea?
for the error, best i can suggest is to use a manual fetch for now and avoid the sdk
I'm not sure why the sdk is wrong, the schema looks fine