Automatic deployments with github actions cloudfare pages 🤔

Hi, I have a repository in github with astro using the api offered by this framework so I used an installation of this video https://www.youtube.com/watch?v=c_IBs1crl4k. The problem I have is that I have to do the “npm run deploy” from my local for the changes to work correctly, otherwise it does not let me use the api ,I automated this process using github actions but when doing the deploy the error comes out.
In a non-interactive environment, it's necessary to set a CLOUDFLARE_API_TOKEN environment variable for wrangler to work. Please go to https://developers.cloudflare.com/fundamentals/api/get-started/create-token/ for instructions on how to create an api token, and assign its value to CLOUDFLARE_API_TOKEN.

I already put the environment variables in github in 'secrets and variables'. I would appreciate your help.
YouTubeCloudflare Developers
With Cloudflare, you can easily deploy your Astro application globally. In this video, Kristian Freeman builds a full-stack application using Astro. He introduces an API endpoint using Astro bindings and integrates Cloudflare KV into his application stack.

Create an account on Cloudflare today for free: https://dash.cloudflare.com/sign-up

Too...
Was this page helpful?