I’m trying to deploy the website to Netlify using the available API, like the code below:
axios.post(
"https://api.netlify.com/api/v1/sites",
{
name: "dival bangun",
repo: {
provider: "github",
id: 652968452,
repo: "sarrahman-keramik/webstore-mitra",
private: false,
branch: "main",
cmd: "npm run build",
dir: ".next",
deploy_key_id: netlifyConfig.DEPLOY_KEY_ID,
},
build_settings: {
env: {
"NEXT_PUBLIC_NAMEAPP": "dival bangun",
},
},
},
{
headers: {
Authorization: `Bearer ${process.env.NETLIFY_API_TOKEN}`,
"Content-Type": "application/json",
},
}
);
But why aren’t the environment variables appearing after the website is successfully deployed?