Skip to main content

Website Build Workflows

Document Version: 1.0.0 Created: December 31, 2025 Owner: CODITECT DevOps Team


Overview

This document defines H.P.006-WORKFLOWS for building and deploying CODITECT websites including:

  • Documentation sites (docs.coditect.ai)
  • Product landing pages (dms.coditect.ai, workflow.coditect.ai)
  • Static content sites

Workflow Index

IDWorkflow NameTypePriority
WB-001Documentation Site BuildBuildP0
WB-002Product Landing BuildBuildP1
WB-003Cloud Run DeploymentDeployP0
WB-004GKE DeploymentDeployP1
WB-005DNS ConfigurationInfrastructureP0
WB-006SSL Certificate SetupInfrastructureP0
WB-007CDN ConfigurationInfrastructureP1
WB-008Site Health VerificationQAP0
WB-009Performance OptimizationQAP1
WB-010Analytics IntegrationIntegrationP2

WB-001: Documentation Site Build

Priority: P0 | Estimated Time: 2-4 hours

Trigger

  • New documentation content added
  • /build-site docs command invoked
  • CI/CD pipeline on docs/ changes

Steps

Input

source_dir: ./docs
output_dir: ./docs-site
site_name: docs
template: docs

Output

dist_dir: ./docs-site/dist
files:
- index.html
- assets/
- sitemap.xml
build_size: ~2MB

Agents Involved

  • website-builder - Primary orchestrator
  • frontend-react-typescript-expert - React components

WB-002: Product Landing Build

Priority: P1 | Estimated Time: 3-5 hours

Trigger

  • New product launch
  • /build-site product --name <product> command
  • Marketing content update

Steps

Product Configuration

{
"name": "CODITECT DMS",
"slug": "dms",
"tagline": "Intelligent Document Management",
"hero": {
"headline": "AI-Powered Document Intelligence",
"description": "Organize, search, and analyze documents with advanced AI",
"ctaText": "Start Free Trial",
"ctaLink": "/register?product=dms"
},
"features": [
{
"icon": "DocumentIcon",
"title": "Smart Organization",
"description": "Automatic categorization and tagging"
}
],
"pricing": {
"price": 29,
"currency": "USD",
"interval": "month"
}
}

WB-003: Cloud Run Deployment

Priority: P0 | Estimated Time: 15-30 minutes

Trigger

  • Successful build (WB-001 or WB-002)
  • /deploy-site <domain> command
  • CI/CD pipeline merge to main

Steps

Cloud Run Configuration

service: docs-coditect
region: us-central1
memory: 256Mi
cpu: 1
min_instances: 0
max_instances: 10
allow_unauthenticated: true

Agents Involved

  • website-builder - Orchestrator
  • devops-engineer - Deployment
  • cloud-architect - Infrastructure

WB-004: GKE Deployment

Priority: P1 | Estimated Time: 30-45 minutes

Trigger

  • High-traffic sites requiring persistent pods
  • Sites needing custom networking

Kubernetes Manifest

apiVersion: apps/v1
kind: Deployment
metadata:
name: docs-coditect
namespace: coditect-prod
spec:
replicas: 2
selector:
matchLabels:
app: docs-coditect
template:
metadata:
labels:
app: docs-coditect
spec:
containers:
- name: nginx
image: gcr.io/PROJECT_ID/docs-coditect:latest
ports:
- containerPort: 8080
resources:
requests:
memory: "128Mi"
cpu: "100m"
limits:
memory: "256Mi"
cpu: "500m"
---
apiVersion: v1
kind: Service
metadata:
name: docs-coditect
spec:
type: ClusterIP
ports:
- port: 80
targetPort: 8080
selector:
app: docs-coditect

WB-005: DNS Configuration

Priority: P0 | Estimated Time: 5-15 minutes

Steps

# 1. Get Cloud Run service URL
SERVICE_URL=$(gcloud run services describe docs-coditect \
--region us-central1 --format='value(status.url)')

# 2. Create/update DNS record
gcloud dns record-sets create docs.coditect.ai. \
--zone=coditect-ai \
--type=CNAME \
--ttl=300 \
--rrdatas="ghs.googlehosted.com."

# 3. Verify propagation
dig docs.coditect.ai CNAME

# 4. Test resolution
curl -I https://docs.coditect.ai

DNS Records Required

DomainTypeValueTTL
docs.coditect.aiCNAMEghs.googlehosted.com.300
dms.coditect.aiCNAMEghs.googlehosted.com.300
workflow.coditect.aiCNAMEghs.googlehosted.com.300

WB-006: SSL Certificate Setup

Priority: P0 | Estimated Time: 5-15 minutes (provisioning)

Automatic (Cloud Run)

Cloud Run automatically provisions SSL certificates when you map a custom domain.

# Map domain (triggers SSL provisioning)
gcloud run domain-mappings create \
--service docs-coditect \
--domain docs.coditect.ai \
--region us-central1

# Check certificate status
gcloud run domain-mappings describe docs.coditect.ai \
--region us-central1 \
--format='value(status.conditions)'

Manual (GKE with cert-manager)

apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: docs-coditect-tls
namespace: coditect-prod
spec:
secretName: docs-coditect-tls
issuerRef:
name: letsencrypt-prod
kind: ClusterIssuer
dnsNames:
- docs.coditect.ai

WB-007: CDN Configuration

Priority: P1 | Estimated Time: 30-60 minutes

Cloud CDN Setup

# Create backend bucket for static assets
gcloud compute backend-buckets create docs-assets \
--gcs-bucket-name=coditect-docs-assets \
--enable-cdn

# Add to load balancer URL map
gcloud compute url-maps add-path-matcher docs-lb \
--path-matcher-name=assets \
--default-backend-bucket=docs-assets \
--path-rules="/assets/*=docs-assets"

Cache Configuration

# Cloud CDN cache policy
cache_policy:
default_ttl: 3600 # 1 hour
max_ttl: 86400 # 24 hours
cache_mode: CACHE_ALL_STATIC
negative_caching: true
serve_while_stale: 86400

WB-008: Site Health Verification

Priority: P0 | Estimated Time: 5-10 minutes

Health Check Script

#!/bin/bash
DOMAIN=$1

echo "Running health checks for $DOMAIN..."

# 1. HTTP Status
HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" "https://$DOMAIN")
echo "HTTP Status: $HTTP_STATUS"

# 2. SSL Certificate
SSL_EXPIRY=$(echo | openssl s_client -connect "$DOMAIN:443" 2>/dev/null | \
openssl x509 -noout -dates 2>/dev/null | grep notAfter)
echo "SSL: $SSL_EXPIRY"

# 3. Response Time
RESPONSE_TIME=$(curl -s -o /dev/null -w "%{time_total}" "https://$DOMAIN")
echo "Response Time: ${RESPONSE_TIME}s"

# 4. Content Check
TITLE=$(curl -s "https://$DOMAIN" | grep -o '<title>[^<]*</title>' | head -1)
echo "Title: $TITLE"

# 5. Key pages
for path in "/" "/docs" "/api"; do
STATUS=$(curl -s -o /dev/null -w "%{http_code}" "https://$DOMAIN$path")
echo " $path: $STATUS"
done

Health Check Criteria

MetricThresholdAction if Exceeded
HTTP Status200Alert + rollback
Response Time< 500msOptimize
SSL Valid> 30 daysRenew
Error Rate< 0.1%Investigate

WB-009: Performance Optimization

Priority: P1 | Estimated Time: 2-4 hours

Lighthouse Targets

MetricTargetCurrent
Performance> 90-
Accessibility> 95-
Best Practices> 95-
SEO> 95-

Optimization Checklist

  • Images optimized (WebP format)
  • JavaScript bundle < 200KB
  • CSS bundle < 50KB
  • Gzip compression enabled
  • Browser caching H.P.009-CONFIGured
  • Lazy loading implemented
  • Critical CSS inlined
  • Fonts preloaded

WB-010: Analytics Integration

Priority: P2 | Estimated Time: 1-2 hours

Google Analytics Setup

// src/lib/analytics.ts
export function initAnalytics() {
if (typeof window !== 'undefined') {
window.dataLayer = window.dataLayer || [];
function gtag(...args: any[]) {
window.dataLayer.push(args);
}
gtag('js', new Date());
gtag('H.P.009-CONFIG', 'G-XXXXXXXXXX');
}
}

export function trackPageView(path: string) {
if (typeof window !== 'undefined' && window.gtag) {
window.gtag('event', 'page_view', {
page_path: path,
});
}
}

Integration with PILOT-PARALLEL-EXECUTION-PLAN

These H.P.006-WORKFLOWS support Track C.4: External Sites & Subdomains:

TaskWorkflow
C.4.1.1: Create docs siteWB-001
C.4.1.2: Configure DNSWB-005
C.4.1.3: Deploy to GCPWB-003
C.4.1.4: Configure SSLWB-006
C.4.1.5: Verify linksWB-008
C.4.2.1: Configure workflow DNSWB-005
C.4.2.2: Create landing pageWB-002
C.4.2.3: Configure SSLWB-006


Owner: CODITECT DevOps Team Last Updated: December 31, 2025