Deployment Platforms
The FiNAN website is deployed on Cloudflare Pages. This platform was chosen for its global edge network, speed, and seamless integration with GitHub.
Cloudflare Pages Configuration
Section titled “Cloudflare Pages Configuration”The project is connected to the GitHub repository. Whenever you push changes to the main branch, Cloudflare automatically builds and deploys the new version.
Project Settings
Section titled “Project Settings”- Project Name:
finan-website - Production Branch:
main - Framework Preset:
Astro - Build Command:
pnpm build - Output Directory:
dist - Node Version: v20 or higher (Current: v22.11.0)
Custom Domains
Section titled “Custom Domains”The website is accessible via the primary domain and an alias:
- Primary:
finan.eu.com(Main production site) - Redirect:
www.finan.eu.com(Redirects to non-www) - Pages Domain:
finan-website.pages.dev(Cloudflare default)
DNS settings are managed within Cloudflare’s dashboard under existing DNS records for the finan.eu.com zone.
Environment Variables
Section titled “Environment Variables”Secure secrets and build configurations are managed through Cloudflare Pages Environment Variables. These are never committed to the repository.
Configuring Variables
Section titled “Configuring Variables”- Log in to the Cloudflare Dashboard.
- Navigate to Workers & Pages > finan-website.
- Go to Settings > Environment Variables.
- Add variables for Production and Preview environments.
Required Variables
Section titled “Required Variables”| Variable Name | Description | Required |
|---|---|---|
GHOST_CONTENT_API_KEY | API Key for fetching blog posts from Ghost CMS | Yes |
GHOST_API_URL | URL of the Ghost CMS instance | Yes |
PUBLIC_SITE_URL | The canonical URL of the site (e.g., https://finan.eu.com) | Yes |
Local Development
Section titled “Local Development”For local development, create a .env file in the root of the project:
GHOST_CONTENT_API_KEY=your_local_key_hereGHOST_API_URL=https://your-ghost-instance.comPUBLIC_SITE_URL=http://localhost:4321Preview Deployments
Section titled “Preview Deployments”Cloudflare Pages automatically creates a Preview Deployment for every Pull Request (PR) opened against the repository.
- URL Pattern:
https://<pr-id>.finan-website.pages.dev - Use Case: Send this URL to stakeholders (board members, editors) to review changes before they go live.
- Comments: Cloudflare Bot will comment on the PR with the direct link.
This allows us to test changes in a production-like environment without affecting the live site.