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
| ID | Workflow Name | Type | Priority |
|---|---|---|---|
| WB-001 | Documentation Site Build | Build | P0 |
| WB-002 | Product Landing Build | Build | P1 |
| WB-003 | Cloud Run Deployment | Deploy | P0 |
| WB-004 | GKE Deployment | Deploy | P1 |
| WB-005 | DNS Configuration | Infrastructure | P0 |
| WB-006 | SSL Certificate Setup | Infrastructure | P0 |
| WB-007 | CDN Configuration | Infrastructure | P1 |
| WB-008 | Site Health Verification | QA | P0 |
| WB-009 | Performance Optimization | QA | P1 |
| WB-010 | Analytics Integration | Integration | P2 |
WB-001: Documentation Site Build
Priority: P0 | Estimated Time: 2-4 hours
Trigger
- New documentation content added
/build-site docscommand 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 orchestratorfrontend-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- Orchestratordevops-engineer- Deploymentcloud-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
| Domain | Type | Value | TTL |
|---|---|---|---|
| docs.coditect.ai | CNAME | ghs.googlehosted.com. | 300 |
| dms.coditect.ai | CNAME | ghs.googlehosted.com. | 300 |
| workflow.coditect.ai | CNAME | ghs.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
| Metric | Threshold | Action if Exceeded |
|---|---|---|
| HTTP Status | 200 | Alert + rollback |
| Response Time | < 500ms | Optimize |
| SSL Valid | > 30 days | Renew |
| Error Rate | < 0.1% | Investigate |
WB-009: Performance Optimization
Priority: P1 | Estimated Time: 2-4 hours
Lighthouse Targets
| Metric | Target | Current |
|---|---|---|
| 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:
| Task | Workflow |
|---|---|
| C.4.1.1: Create docs site | WB-001 |
| C.4.1.2: Configure DNS | WB-005 |
| C.4.1.3: Deploy to GCP | WB-003 |
| C.4.1.4: Configure SSL | WB-006 |
| C.4.1.5: Verify links | WB-008 |
| C.4.2.1: Configure workflow DNS | WB-005 |
| C.4.2.2: Create landing page | WB-002 |
| C.4.2.3: Configure SSL | WB-006 |
Related Documentation
- Agent: website-builder.md
- Skill: website-builder-patterns
- Commands: /build-site, /deploy-site
- Scripts: build-website.py, deploy-website.sh
- ADRs: ADR-015 (External sites appendix)
- Inventory: EXTERNAL-LINKS-INVENTORY.md
Owner: CODITECT DevOps Team Last Updated: December 31, 2025