---
phase: 05-publish-and-deploy
plan: 02
type: execute
wave: 1
depends_on: []
files_modified:
  - docs/docs/CNAME
  - docs/mkdocs.yml
  - docs/.github/workflows/deploy.yml
autonomous: true

must_haves:
  truths:
    - "CNAME file contains docs.guard.meshulash.ai (not docs.meshulash.ai)"
    - "mkdocs.yml site_url points to https://docs.guard.meshulash.ai"
    - "deploy.yml runs mkdocs gh-deploy --force on push to main in docs repo"
    - "deploy.yml configures git user as github-actions[bot] before deploying"
  artifacts:
    - path: "docs/docs/CNAME"
      provides: "Custom domain file preserved across mkdocs gh-deploy runs"
      contains: "docs.guard.meshulash.ai"
    - path: "docs/mkdocs.yml"
      provides: "MkDocs config with correct site_url for new domain"
      contains: "https://docs.guard.meshulash.ai"
    - path: "docs/.github/workflows/deploy.yml"
      provides: "Auto-deploy docs on push to main via mkdocs gh-deploy"
      contains: "mkdocs gh-deploy --force"
  key_links:
    - from: "docs/.github/workflows/deploy.yml"
      to: "docs/mkdocs.yml"
      via: "mkdocs gh-deploy reads mkdocs.yml"
      pattern: "mkdocs gh-deploy"
    - from: "docs/mkdocs.yml"
      to: "docs/docs/CNAME"
      via: "mkdocs copies docs_dir contents (including CNAME) to site/"
      pattern: "site_url"
---

<objective>
Update the docs configuration for the new domain (docs.guard.meshulash.ai) and create the GitHub Actions deploy workflow for the docs repo.

Purpose: Ensures the docs site deploys to the correct custom domain automatically when changes are pushed to main in the docs repo.
Output: Updated CNAME, updated mkdocs.yml site_url, and a new deploy.yml workflow.
</objective>

<execution_context>
@/Users/shalev/.claude/get-shit-done/workflows/execute-plan.md
@/Users/shalev/.claude/get-shit-done/templates/summary.md
</execution_context>

<context>
@.planning/PROJECT.md
@.planning/ROADMAP.md
@.planning/STATE.md
@.planning/phases/05-publish-and-deploy/05-CONTEXT.md
@.planning/phases/05-publish-and-deploy/05-RESEARCH.md
@docs/mkdocs.yml
@docs/docs/CNAME
</context>

<tasks>

<task type="auto">
  <name>Task 1: Update CNAME and mkdocs.yml for new domain</name>
  <files>docs/docs/CNAME, docs/mkdocs.yml</files>
  <action>
1. Update `docs/docs/CNAME`: Replace `docs.meshulash.ai` with `docs.guard.meshulash.ai`. File must contain exactly one line, no trailing newline or slash, no `https://` prefix.

2. Update `docs/mkdocs.yml`: Change `site_url: https://docs.meshulash.ai` to `site_url: https://docs.guard.meshulash.ai`. No other changes to mkdocs.yml.

These two changes are critical — if the CNAME is wrong, GitHub Pages serves on the wrong domain. If site_url is wrong, canonical URLs and sitemap point to the old domain.
  </action>
  <verify>`cat docs/docs/CNAME` shows exactly `docs.guard.meshulash.ai`. `grep site_url docs/mkdocs.yml` shows `https://docs.guard.meshulash.ai`.</verify>
  <done>CNAME contains new domain, mkdocs.yml site_url matches new domain</done>
</task>

<task type="auto">
  <name>Task 2: Create docs deploy workflow</name>
  <files>docs/.github/workflows/deploy.yml</files>
  <action>
Create `docs/.github/workflows/deploy.yml` for the docs repo. This workflow file lives inside the `docs/` directory (which IS the docs repo root — it's a separate repo from the SDK).

The workflow:
- Trigger: `push` to `main` branch
- Permissions: `contents: write` (workflow-level is fine here — single job, needs to push to gh-pages)
- Single job (`deploy`):
  1. `actions/checkout@v4`
  2. Configure git user: `github-actions[bot]` name and `41898282+github-actions[bot]@users.noreply.github.com` email
  3. `actions/setup-python@v5` with python-version `3.x`
  4. `actions/cache@v4` caching `~/.cache/pip` with key `mkdocs-material-${{ hashFiles('requirements.txt') }}`
  5. `pip install -r requirements.txt`
  6. `mkdocs gh-deploy --force`

Use exact YAML from 05-RESEARCH.md deploy.yml code example. The git user config step is REQUIRED — mkdocs gh-deploy commits to gh-pages and needs a configured git identity.

NOTE: Create the directory `docs/.github/workflows/` since it doesn't exist yet. This is the `.github/workflows/` directory INSIDE the docs repo (which is at `docs/` in this project's root).
  </action>
  <verify>Validate YAML syntax: `python3 -c "import yaml; yaml.safe_load(open('docs/.github/workflows/deploy.yml'))"`. Verify file contains `mkdocs gh-deploy --force` and `contents: write`.</verify>
  <done>deploy.yml exists at docs/.github/workflows/deploy.yml with auto-deploy on push to main</done>
</task>

</tasks>

<verification>
1. `cat docs/docs/CNAME` shows `docs.guard.meshulash.ai`
2. `grep site_url docs/mkdocs.yml` shows `https://docs.guard.meshulash.ai`
3. `cat docs/.github/workflows/deploy.yml` exists and parses as valid YAML
4. deploy.yml contains `mkdocs gh-deploy --force` and `contents: write`
</verification>

<success_criteria>
- CNAME updated to docs.guard.meshulash.ai
- mkdocs.yml site_url updated to https://docs.guard.meshulash.ai
- deploy.yml workflow created for auto-deploying docs on push to main
</success_criteria>

<output>
After completion, create `.planning/phases/05-publish-and-deploy/05-02-SUMMARY.md`
</output>
