If those actions in DatoCMS are triggering a build and those are visible in your deploys view, that part of the setup should be fine. But I notice that you don’t appear to have a build command set. Is a build command specified in your netlify.toml instead, and does triggering a build from your deploy page in the Netlify UI result in a good build?
So now at least we can see that a build is trying to run, where as before it was not trying to do anything. That error now tells us that your build fails. Some things to check:
What is your build? You’ve now told Netlify to run the build command you’ve specified in your package.json, but what is that calling, and is that same build command do you run locally on your site in development?
Does your build run successfully in your local development environment?
You may get more insight by looking at the deploy logs in Netlify rather than the response to your build hook over in Dato CMS. The key seems to be that your builds are not successful (no matter where thet are triggered from).
As a reminder, you can trigger deploys directly from the deploys page of your Netlify UI, which might be more convenient for reviewing the deploy logs and looking for errors in your build.
Yes it does indeed look like Netlify can’t see your package.json file. Is that in the project base directory? And is the base directory set to / or somewhere else in the netlify config?
Your repo is private so I can’t snoop around there to see
I’m using Astro as the framework and run a build each time before uploading to the repo.
I’ve just checked the repository and couldn’t see a package.json file in there.
I’ve uploaded it manually and changed the netlify build settings to “astro build”.
When I go back to Dato CMS I get a successful build message and a successful deploy message in Netlify.
But still no changes on the front end however!
The base directory in Netlify is / and I’ve made the repo public now if need to have a look.
There’s a slight misunderstanding about what should go into the repo and how Netlify deploys a site for you. Let me see if I can help…
Currently, you are running a build locally, and then taking what that build generates and uploading it to your GitHub repo. You are also pointing Netlify at that root of that repo and asking it to host that for you as your site. That works fine, but you have to run that build and upload each time you want to update because Netlify has no sight of your source code for generating the site.
However, Netlify can run that build for you, take the output, and host it. That’s what we need to get rolling.
So, rather than your repo containing the output from your Astro site build, it needs to contain the project code itself so that Netlify can run the same build operation you currently run locally, and thus get access to the new output.
It looks like you are perhaps uploading the content that running astro build generates into a dist folder or similar, to GitHub. That would be why your package.json file could not be found until you manually added it. It actually resides at the root of your project.
You’ll need to have the entire project directory, and not just the contents of the dist folder, in your git repo, and then you can tell Netlify to publish what your project builds either through the UI (see the setting for “Publish directory”, below), or in your netlify.toml (which also needs to be at the root of your project )
You can exclude things like the hefty node_modules and dist directories from your repo by listing them in a .gitignore file. They’ll be populated in Netlify’s builds just as the would be locally for you when you run npm install and astro build