Skip to content

site update

site update #37

name: Deploy Jekyll with GitHub Pages dependencies preinstalled
on:
push:
branches: ["main"]
paths-ignore:
- 'VERSION'
workflow_dispatch:
permissions:
contents: write
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.VERSION }}
release: ${{ steps.changes.outputs.release }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check for content changes
id: changes
run: |
git fetch origin main --depth=2
# Only these files trigger a release (actual documentation)
CONTENT_CHANGES=$(git diff --name-only HEAD~1 HEAD 2>/dev/null | grep -E '^(README\.md|TUTORIAL\.md|CREDITS\.md|docs/)' || true)
# Release only if there are documentation changes
if [ -n "$CONTENT_CHANGES" ]; then
echo "Documentation changes detected:"
echo "$CONTENT_CHANGES"
echo "release=true" >> $GITHUB_OUTPUT
else
echo "No documentation changes, skipping release"
echo "release=false" >> $GITHUB_OUTPUT
fi
- name: Set version
id: version
run: |
VERSION="1.0.${{ github.run_number }}"
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
echo "$VERSION" > VERSION
- name: Commit version file
if: steps.changes.outputs.release == 'true'
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add VERSION
git diff --staged --quiet || git commit -m "Bump version to ${{ steps.version.outputs.VERSION }}"
git push
- name: Add version and build date to config
run: |
echo "version: \"${{ steps.version.outputs.VERSION }}\"" >> github-pages/_config.yml
echo "build_date: \"$(date +'%Y-%m-%d')\"" >> github-pages/_config.yml
- name: Generate templates page
run: |
cat > github-pages/templates.md << 'HEADER'
---
layout: default
title: Templates for AGENTS.md, ADR, and Feature Docs
description: Download ready-to-use templates for MCAF and vibe coding. Includes AGENTS.md template for Claude Code, Codex, Gemini, Cursor, ADR templates, and feature documentation for AI-assisted development.
keywords: MCAF templates, AGENTS.md template, vibe coding templates, AI-assisted development, ADR template, Claude Code, Codex, Gemini, Cursor rules
nav_order: 2
---
# Templates
Ready-to-use templates for adopting MCAF in your repository. <br/>
These files define how AI agents work in your codebase, document architectural decisions, and describe features with clear test flows.
<div class="templates-list">
HEADER
sed -i 's/^ //' github-pages/templates.md
for file in docs/templates/*.md; do
if [ -f "$file" ]; then
filename=$(basename "$file")
name="${filename%.md}"
echo "<div class=\"template-item\">" >> github-pages/templates.md
echo "<span class=\"template-name\">${name}</span>" >> github-pages/templates.md
echo "<div class=\"template-links\">" >> github-pages/templates.md
echo "<a href=\"https://github.com/managedcode/MCAF/blob/main/docs/templates/${filename}\">View</a>" >> github-pages/templates.md
echo "<a href=\"https://raw.githubusercontent.com/managedcode/MCAF/main/docs/templates/${filename}\" download>Download</a>" >> github-pages/templates.md
echo "</div>" >> github-pages/templates.md
echo "</div>" >> github-pages/templates.md
fi
done
echo "</div>" >> github-pages/templates.md
- name: Copy TUTORIAL to github-pages
run: |
cat > github-pages/tutorial.md << 'EOF'
---
layout: default
title: Tutorial - Implement Vibe Coding with Structure
description: Step-by-step tutorial for implementing MCAF in your project. Learn to set up AGENTS.md, configure Coding AI agents like Claude Code, Codex, Gemini, Cursor, and enable safe vibe coding with automated verification.
keywords: MCAF tutorial, vibe coding tutorial, AI-assisted development, AI-assisted coding, AGENTS.md setup, Claude Code, Codex, Gemini, Cursor, GitHub Copilot
nav_order: 3
---
EOF
sed -i 's/^ //' github-pages/tutorial.md
cat TUTORIAL.md >> github-pages/tutorial.md
- name: Copy CREDITS to github-pages
run: |
cat > github-pages/credits.md << 'EOF'
---
layout: default
title: Credits and Acknowledgments
description: Credits and acknowledgments for MCAF framework contributors. Learn about the team and inspirations behind the Managed Code Coding AI Framework.
keywords: MCAF credits, ManagedCode team, AI framework contributors, acknowledgments
nav_order: 4
---
EOF
sed -i 's/^ //' github-pages/credits.md
cat CREDITS.md >> github-pages/credits.md
- name: Copy README to github-pages with TOC
run: |
WORDS=$(wc -w < README.md)
MINUTES=$(( (WORDS + 200) / 200 ))
cat > github-pages/index.md << 'EOF'
---
layout: default
title: MCAF - Coding AI Framework for Building Real Software
description: MCAF is a framework that solves the problem of unpredictable AI coding. Build real production software with Coding AI agents using structured context, automated tests as verification gates, and AGENTS.md instructions. Vibe coding that actually works.
keywords: MCAF, Coding AI Framework, AGENTS.md, vibe coding, AI-assisted development, AI-assisted coding, real software, production code, Claude Code, Codex, Gemini, ChatGPT, Cursor, GitHub Copilot, Windsurf, Cline, Aider, ManagedCode
is_home: true
nav_order: 1
---
EOF
sed -i 's/^ //' github-pages/index.md
awk '/^---$/{exit} {print}' README.md >> github-pages/index.md
echo "" >> github-pages/index.md
echo "<p class=\"reading-time\">${MINUTES} min read</p>" >> github-pages/index.md
echo '' >> github-pages/index.md
echo '<nav class="toc">' >> github-pages/index.md
echo '<div class="toc-title">Table of Contents</div>' >> github-pages/index.md
echo '<ol>' >> github-pages/index.md
echo '<li><a href="#1-what-mcaf-is">What MCAF Is</a></li>' >> github-pages/index.md
echo '<li><a href="#2-context">Context</a></li>' >> github-pages/index.md
echo '<li><a href="#3-verification">Verification</a></li>' >> github-pages/index.md
echo '<li><a href="#4-instructions-and-agentsmd">Instructions and AGENTS.md</a></li>' >> github-pages/index.md
echo '<li><a href="#5-coding-and-testability">Coding and Testability</a></li>' >> github-pages/index.md
echo '<li><a href="#6-perspectives">Perspectives</a></li>' >> github-pages/index.md
echo '<li><a href="#7-development-cycle">Development Cycle</a></li>' >> github-pages/index.md
echo '<li><a href="#8-ai-participation-modes">AI Participation Modes</a></li>' >> github-pages/index.md
echo '<li><a href="#9-adopting-mcaf-in-a-repository">Adopting MCAF</a></li>' >> github-pages/index.md
echo '</ol>' >> github-pages/index.md
echo '</nav>' >> github-pages/index.md
echo '' >> github-pages/index.md
echo '---' >> github-pages/index.md
awk '/^---$/{found=1; next} found{print}' README.md >> github-pages/index.md
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: ./github-pages
destination: ./_site
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
release:
runs-on: ubuntu-latest
needs: build
if: needs.build.outputs.release == 'true'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Create Release
uses: softprops/action-gh-release@v1
with:
tag_name: v${{ needs.build.outputs.version }}
name: Release ${{ needs.build.outputs.version }}
body: |
## MCAF Release ${{ needs.build.outputs.version }}
Managed Code Coding AI Framework
draft: false
prerelease: false
generate_release_notes: true