How plattar/workflows works
Project type and purpose
• This repository is an open-source library of reusable GitHub Actions workflows whose sole purpose is to build and deploy applications to Cloudflare Pages with multi-environment support.
File structure analysis
• Top-level directories/files:
• .github/workflows/cloudflare-pages-deploy.yml ← the reusable workflow
• LICENSE
• README.md
• No frontend/backend separation here—this is strictly a CI/CD pipeline definition.
README insights
• Describes how to call the workflow from any consumer repo.
• Lists required inputs (tag, environment, project-name, build-directory, etc.) and secrets (CLOUDFLARE_API_TOKEN, CLOUDFLARE_ACCOUNT_ID).
• Defines tag conventions (1.0.0, 1.0.0-staging, etc.).
a. Main components
1. Developer (or automated process)
2. Caller Repository (your app’s codebase)
3. GitHub Actions Runner
4. Shared Workflows Repository (this project)
5. Build Environment (Node.js container on the runner)
6. Secrets Store (GitHub Actions secrets)
7. Cloudflare Pages Service (external API)
b. Relationships and interactions
• Developer pushes a tag or dispatches a workflow →
• GitHub Actions event triggers on the Caller Repository →
• Runner clones Caller Repo, then imports the cloudflare-pages-deploy.yml workflow from the Shared Workflows Repo →
• Runner fetches secrets from the Secrets Store →
• Runner spins up a Node.js container, runs npm run build (or custom build-command) →
• Artifacts are collected (output-directory) →
• Runner calls the Cloudflare Pages API (using CLOUDFLARE_API_TOKEN & CLOUDFLARE_ACCOUNT_ID) to deploy to the specified environment →
• Cloudflare Pages returns deployment status → job completes.
c. Architectural patterns & principles
• CI/CD pipeline using reusable/composite workflows
• Single source of truth for deployment logic
• Separation of concerns: build and deploy steps are encapsulated in the shared workflow
• Inputs & secrets model to parameterize environments and keep credentials secure
d. Key technologies & frameworks
• GitHub Actions (reusable/composite workflows)
• Node.js / npm
• Cloudflare Pages REST API
Detail level
• Step in the CI/CD pipeline (trigger, checkout, setup, build, deploy).
• Where inputs enter the flow and where secrets are pulled.
• Don’t omit the reusable-workflow import action—this is the core of the library.