Skip to content

Commit d7d3954

Browse files
Fury3KMasuRii
andauthored
Add documentation site with GitHub Pages auto-deploy (#4)
## Summary - Static documentation site modeled after code.claude.com/docs - 12 modular pages loaded dynamically via `fetch()` from `pages/*.html` - Dark theme, sidebar nav, search (`Ctrl+K`), copy code / copy as MD / copy page - ReCursor SVG branding in header and favicon - GitHub Actions workflow (`.github/workflows/docs.yml`) auto-deploys `docs-site/` to GitHub Pages on push to `main` - Repo homepage already set to https://recursivedev.github.io/ReCursor ## Test plan - [ ] Merge PR and verify GitHub Actions workflow runs successfully - [ ] Confirm site is live at https://recursivedev.github.io/ReCursor - [ ] Check all 12 pages load, sidebar navigation works, search finds content - [ ] Test copy code, copy as markdown, and copy page buttons - [ ] Verify mobile responsive layout (sidebar toggle, stacked grids) --------- Co-authored-by: MasuRii <kanjiharigana@gmail.com>
1 parent f9bff96 commit d7d3954

285 files changed

Lines changed: 41146 additions & 454 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.githooks/pre-commit

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
REPO_ROOT="$(git rev-parse --show-toplevel)"
5+
cd "$REPO_ROOT"
6+
7+
mapfile -t STAGED_DART_FILES < <(
8+
git diff --cached --name-only --diff-filter=ACMR \
9+
| grep -E '^apps/mobile/.*\.dart$' \
10+
| grep -Ev '\.(g|freezed)\.dart$' \
11+
|| true
12+
)
13+
14+
mapfile -t STAGED_BRIDGE_FILES < <(
15+
git diff --cached --name-only --diff-filter=ACMR \
16+
| grep -E '^packages/bridge/' \
17+
| grep -Ev '^packages/bridge/(dist|node_modules)/' \
18+
| grep -E '\.(ts|js|cjs|mjs|json)$' \
19+
|| true
20+
)
21+
22+
if [[ ${#STAGED_DART_FILES[@]} -eq 0 && ${#STAGED_BRIDGE_FILES[@]} -eq 0 ]]; then
23+
echo "pre-commit: no staged mobile or bridge source files found; skipping checks."
24+
exit 0
25+
fi
26+
27+
if [[ ${#STAGED_DART_FILES[@]} -gt 0 ]]; then
28+
echo "pre-commit: formatting staged Dart files"
29+
dart format "${STAGED_DART_FILES[@]}"
30+
git add "${STAGED_DART_FILES[@]}"
31+
32+
ANALYZE_TARGETS=()
33+
for file in "${STAGED_DART_FILES[@]}"; do
34+
ANALYZE_TARGETS+=("${file#apps/mobile/}")
35+
done
36+
37+
echo "pre-commit: analyzing staged Dart files"
38+
pushd apps/mobile > /dev/null
39+
flutter analyze "${ANALYZE_TARGETS[@]}"
40+
popd > /dev/null
41+
fi
42+
43+
if [[ ${#STAGED_BRIDGE_FILES[@]} -gt 0 ]]; then
44+
if [[ ! -d packages/bridge/node_modules ]]; then
45+
echo "pre-commit: packages/bridge/node_modules is missing. Run 'cd packages/bridge && npm ci' first." >&2
46+
exit 1
47+
fi
48+
49+
BRIDGE_RELATIVE_FILES=()
50+
for file in "${STAGED_BRIDGE_FILES[@]}"; do
51+
BRIDGE_RELATIVE_FILES+=("${file#packages/bridge/}")
52+
done
53+
54+
echo "pre-commit: formatting staged bridge files"
55+
pushd packages/bridge > /dev/null
56+
npm exec prettier -- --write "${BRIDGE_RELATIVE_FILES[@]}"
57+
popd > /dev/null
58+
git add "${STAGED_BRIDGE_FILES[@]}"
59+
60+
echo "pre-commit: typechecking bridge"
61+
pushd packages/bridge > /dev/null
62+
npm run typecheck
63+
64+
echo "pre-commit: running bridge tests"
65+
npm run test:ci
66+
67+
echo "pre-commit: building bridge"
68+
npm run build
69+
popd > /dev/null
70+
fi

.github/workflows/deploy.yml

Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
name: Deploy
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
workflow_dispatch:
8+
inputs:
9+
environment:
10+
description: "Deployment environment"
11+
required: true
12+
default: staging
13+
type: choice
14+
options:
15+
- staging
16+
- production
17+
18+
jobs:
19+
build-android:
20+
name: Build Android
21+
runs-on: ubuntu-latest
22+
defaults:
23+
run:
24+
working-directory: apps/mobile
25+
26+
steps:
27+
- uses: actions/checkout@v4
28+
29+
- name: Set up Java
30+
uses: actions/setup-java@v4
31+
with:
32+
java-version: "17"
33+
distribution: temurin
34+
35+
- name: Set up Flutter
36+
uses: subosito/flutter-action@v2
37+
with:
38+
flutter-version: "3.22.x"
39+
channel: stable
40+
cache: true
41+
42+
- name: Install dependencies
43+
run: flutter pub get
44+
45+
- name: Run code generation
46+
run: dart run build_runner build --delete-conflicting-outputs
47+
48+
- name: Decode keystore
49+
run: |
50+
echo "${{ secrets.ANDROID_KEYSTORE_BASE64 }}" | base64 --decode > android/app/keystore.jks
51+
52+
- name: Build App Bundle
53+
env:
54+
KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
55+
KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }}
56+
KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }}
57+
run: flutter build appbundle --release
58+
59+
- name: Upload AAB artifact
60+
uses: actions/upload-artifact@v4
61+
with:
62+
name: android-release
63+
path: apps/mobile/build/app/outputs/bundle/release/app-release.aab
64+
65+
build-ios:
66+
name: Build iOS
67+
runs-on: macos-latest
68+
defaults:
69+
run:
70+
working-directory: apps/mobile
71+
72+
steps:
73+
- uses: actions/checkout@v4
74+
75+
- name: Set up Flutter
76+
uses: subosito/flutter-action@v2
77+
with:
78+
flutter-version: "3.22.x"
79+
channel: stable
80+
cache: true
81+
82+
- name: Install Ruby + Fastlane
83+
uses: ruby/setup-ruby@v1
84+
with:
85+
ruby-version: "3.3"
86+
bundler-cache: true
87+
88+
- name: Install dependencies
89+
run: flutter pub get
90+
91+
- name: Run code generation
92+
run: dart run build_runner build --delete-conflicting-outputs
93+
94+
- name: Fastlane — certificates
95+
working-directory: .
96+
env:
97+
MATCH_GIT_URL: ${{ secrets.MATCH_GIT_URL }}
98+
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
99+
FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: ${{ secrets.FASTLANE_APP_PASSWORD }}
100+
run: bundle exec fastlane ios certificates
101+
102+
- name: Fastlane — build
103+
working-directory: .
104+
env:
105+
MATCH_GIT_URL: ${{ secrets.MATCH_GIT_URL }}
106+
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
107+
run: bundle exec fastlane ios build
108+
109+
- name: Upload IPA artifact
110+
uses: actions/upload-artifact@v4
111+
with:
112+
name: ios-release
113+
path: apps/mobile/build/ios/iphoneos/Runner.app
114+
115+
deploy-android:
116+
name: Deploy Android
117+
runs-on: ubuntu-latest
118+
needs: build-android
119+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
120+
121+
steps:
122+
- uses: actions/checkout@v4
123+
124+
- name: Download AAB
125+
uses: actions/download-artifact@v4
126+
with:
127+
name: android-release
128+
129+
- name: Install Ruby + Fastlane
130+
uses: ruby/setup-ruby@v1
131+
with:
132+
ruby-version: "3.3"
133+
bundler-cache: true
134+
135+
- name: Deploy to Play Store
136+
env:
137+
SUPPLY_JSON_KEY: ${{ secrets.GOOGLE_PLAY_JSON_KEY }}
138+
run: bundle exec fastlane android deploy
139+
140+
deploy-ios:
141+
name: Deploy iOS
142+
runs-on: macos-latest
143+
needs: build-ios
144+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
145+
146+
steps:
147+
- uses: actions/checkout@v4
148+
149+
- name: Download IPA
150+
uses: actions/download-artifact@v4
151+
with:
152+
name: ios-release
153+
154+
- name: Install Ruby + Fastlane
155+
uses: ruby/setup-ruby@v1
156+
with:
157+
ruby-version: "3.3"
158+
bundler-cache: true
159+
160+
- name: Deploy to TestFlight
161+
env:
162+
FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: ${{ secrets.FASTLANE_APP_PASSWORD }}
163+
FASTLANE_SESSION: ${{ secrets.FASTLANE_SESSION }}
164+
run: bundle exec fastlane ios testflight

.github/workflows/docs.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Deploy Docs to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- "docs-site/**"
8+
- ".github/workflows/docs.yml"
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: read
13+
pages: write
14+
id-token: write
15+
16+
concurrency:
17+
group: pages
18+
cancel-in-progress: true
19+
20+
jobs:
21+
deploy:
22+
name: Deploy
23+
runs-on: ubuntu-latest
24+
environment:
25+
name: github-pages
26+
url: ${{ steps.deployment.outputs.page_url }}
27+
28+
steps:
29+
- uses: actions/checkout@v4
30+
31+
- name: Configure GitHub Pages
32+
uses: actions/configure-pages@v5
33+
34+
- name: Upload docs-site as Pages artifact
35+
uses: actions/upload-pages-artifact@v3
36+
with:
37+
path: docs-site
38+
39+
- name: Deploy to GitHub Pages
40+
id: deployment
41+
uses: actions/deploy-pages@v4
42+
43+
update-repo:
44+
name: Update repo metadata
45+
runs-on: ubuntu-latest
46+
needs: deploy
47+
permissions:
48+
contents: read
49+
steps:
50+
- name: Set homepage URL and description
51+
env:
52+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53+
run: |
54+
gh repo edit RecursiveDev/ReCursor \
55+
--homepage "https://recursivedev.github.io/ReCursor" \
56+
--description "Mobile-first companion UI for AI coding workflows - Flutter app with OpenCode-like UX, Claude Code Hooks integration, and Agent SDK support"

0 commit comments

Comments
 (0)