In this guide, I will explain you the process of creating and deploying the website on cloudflare network
Signup and create a new website
Go to cloudflare.com, Signup and login to the account. Now you will be on the cloudflare dashboard with a sidebar on the left side.
Deploy to Cloudflare
- Navigate to the “Workers & Pages”
- Click on Create application button
- There you will see two tabs, “Workers”, “Pages”. Click on Pages tab
- Click on “Connect to Git”
- At first, It will take you to the github.com for authorization and required permissions for getting access to the Github’s source code.
- Select the repository which has the source code of the website and click on begin step.
- Now, you are on “set up builds and deployments”. You need to add the following information in this sectoin
- Under build settings > Framework preset, Select Astro
- Expand the Environment variables section at the end
- Add some variables with the following names (we will update these values after getting our whatsapp token and other information
- WHATSAPP_TOKEN ( add some random value for now)
- WHATSAPP_API_VERSION ( put the value of “v18.0” )
- WHATSAPP_SENDER_ID ( add random value for now)
- WHATSAPP_RECIPIENT_NUMBER ( add random value for now)
- Click on Save and Deploy
- Cloudflare will take some time and deploy your website to cloudflare network
<aside>
💡 You can add custom domain for your website under the dashboard of your cloudflare application
</aside>