First iteration Hugo one-pager for open-rtls.com.
- Hugo
- Tailwind CSS v4 (
@tailwindcss/typography) - Vite for frontend asset build
- Cloudflare Pages static hosting
npm ci
npm run devnpm ci
npm run buildBuild output directory is public/.
Use these settings:
- Build command:
npm ci && npm run build - Build output directory:
public
wrangler.toml is included as a Pages-ready scaffold for future iteration needs.
Publishing is handled by GitHub Actions:
- Pull requests to
mainrun validation (.github/workflows/pr-validate.yml) - Pushes/merges to
mainauto-deploy to Cloudflare Pages (.github/workflows/deploy-cloudflare.yml)
Account->Cloudflare Pages->EditZone->DNS->EditZone->Zone->Read- Zone Resources: include
open-rtls.com
Create repository secrets in GitHub:
CLOUDFLARE_API_TOKENCLOUDFLARE_ACCOUNT_ID
You can load these from cloudflare.env using GitHub CLI:
while IFS='=' read -r key value; do
[[ -z "$key" || "$key" =~ ^# ]] && continue
gh secret set "$key" --body "$value"
done < cloudflare.env- Add custom domains to the Pages project:
open-rtls.comwww.open-rtls.com
- In DNS, point both hostnames to
open-rtls-website.pages.devasCNAMErecords. - Keep DNS records as
DNS onlyuntil domain status isactive. - Add redirect rule:
- Source:
https://www.open-rtls.com/* - Target:
https://open-rtls.com/$1 - Status:
301
- Source:
After that, merging to main publishes automatically.
If you need to deploy from a local machine instead of GitHub Actions:
- Create API token permissions in Cloudflare:
Account->Cloudflare Pages->EditZone->DNS->EditZone->Zone->Read- Zone Resources: include
open-rtls.com
- Create local credentials file:
cp cloudflare.env.example cloudflare.envFill in CLOUDFLARE_API_TOKEN in cloudflare.env.
- One-time domain setup in Cloudflare Pages:
- Add custom domains to the Pages project:
open-rtls.comwww.open-rtls.com
- In DNS, point both hostnames to
open-rtls-website.pages.devasCNAMErecords. - Keep DNS records as
DNS onlyuntil domain status isactive. - Add redirect rule:
- Source:
https://www.open-rtls.com/* - Target:
https://open-rtls.com/$1 - Status:
301
- Source:
- Deploy (repeatable):
npm run deploy:cloudflareThis command builds the site, ensures the Pages project exists, and deploys to production.
This first iteration focuses on a usable initial website version. Deployment automation is configured through GitHub Actions.