Skip to content

Merge pull request #7 from gitmem-dev/feature/OD-734-restore-docs-source #3

Merge pull request #7 from gitmem-dev/feature/OD-734-restore-docs-source

Merge pull request #7 from gitmem-dev/feature/OD-734-restore-docs-source #3

Workflow file for this run

name: Deploy Docs
on:
push:
branches: [main]
paths:
- 'apps/docs/**'
- 'src/tools/definitions.ts'
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout gitmem repo
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Install root dependencies
run: npm ci
- name: Build MCP server (needed for tool doc generation)
run: npm run build
- name: Install docs dependencies
run: cd apps/docs && npm ci
- name: Build docs site
run: cd apps/docs && npm run build
# Push built docs to landing page repo (Cloudways serves it)
- name: Checkout landing page repo
uses: actions/checkout@v4
with:
repository: gitmem-dev/GitMem.ai-Landing
token: ${{ secrets.LANDING_DEPLOY_TOKEN }}
path: _landing
- name: Copy docs build to landing repo
run: |
rm -rf _landing/docs _landing/_next _landing/llms.txt _landing/llms-full.txt
cp -r apps/docs/out/docs _landing/docs
cp -r apps/docs/out/_next _landing/_next
cp apps/docs/out/llms.txt _landing/llms.txt
cp apps/docs/out/llms-full.txt _landing/llms-full.txt
- name: Push to landing repo
run: |
cd _landing
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add docs _next llms.txt llms-full.txt
git diff --staged --quiet && echo "No changes to deploy" && exit 0
git commit -m "docs: update from gitmem repo ($(date -u +%Y-%m-%dT%H:%M:%SZ))"
git push