Skip to content

Commit 105f71f

Browse files
committed
Revert "Revert "Merge branch 'main' into carlos/templates-sidebar""
This reverts commit fcb98ad.
1 parent 3229142 commit 105f71f

File tree

149 files changed

+7084
-876
lines changed

Some content is hidden

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

149 files changed

+7084
-876
lines changed

.github/workflows/deploy-dev.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@ permissions:
1414
contents: read
1515

1616
env:
17+
NODE_OPTIONS: "--max-old-space-size=8192"
1718
CP_WEB_URL: https://cloud.rxc.app/
1819
CP_BACKEND_URL: https://cloud-f188e2cd-51fb-4b29-b546-2ce4b9efc5d5.fly.dev/
20+
DEV_TYPESENSE_HOST: ${{ secrets.DEV_TYPESENSE_HOST }}
21+
DEV_TYPESENSE_SEARCH_API_KEY: ${{ secrets.DEV_TYPESENSE_SEARCH_API_KEY }}
1922

2023
jobs:
2124
deploy:
@@ -37,7 +40,26 @@ jobs:
3740
- name: Update Reflex CLI
3841
run: uv pip install reflex-hosting-cli -U
3942

43+
- name: Index documentation to Typesense
44+
env:
45+
TYPESENSE_ADMIN_API_KEY: ${{ secrets.DEV_TYPESENSE_ADMIN_API_KEY }}
46+
TYPESENSE_HOST: ${{ secrets.DEV_TYPESENSE_HOST }}
47+
run: |
48+
uv pip install typesense python-frontmatter markdown beautifulsoup4
49+
python scripts/typesense_indexer.py --force
50+
4051
- name: Deploy to Reflex
4152
id: deploy
4253
run: |
4354
reflex deploy --project ${{ secrets.DEV_PROJECT_ID }} --token ${{ secrets.DEV_TOKEN }} --no-interactive
55+
56+
- name: Check for dead links
57+
run: |
58+
# Install dependencies for dead link checker
59+
uv pip install -r scripts/requirements.txt
60+
61+
# Wait a moment for deployment to be fully ready
62+
sleep 30
63+
64+
# Run dead link checker
65+
python scripts/check_dead_links.py https://pcweb-gray-orca.rxc.app --timeout 15 --delay 1

.github/workflows/deploy-prd.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ permissions:
1212
contents: read
1313

1414
env:
15+
NODE_OPTIONS: "--max-old-space-size=8192"
1516
FLY_API_TOKEN: ${{ secrets.PRD_FLY_API_TOKEN }}
17+
TYPESENSE_HOST: ${{ secrets.PRD_TYPESENSE_HOST }}
18+
TYPESENSE_SEARCH_API_KEY: ${{ secrets.PRD_TYPESENSE_SEARCH_API_KEY }}
1619

1720
jobs:
1821
deploy:
@@ -35,6 +38,14 @@ jobs:
3538
- name: Update Reflex CLI
3639
run: uv pip install reflex-hosting-cli -U
3740

41+
- name: Index documentation to Typesense
42+
env:
43+
TYPESENSE_ADMIN_API_KEY: ${{ secrets.PRD_TYPESENSE_ADMIN_API_KEY }}
44+
TYPESENSE_HOST: ${{ secrets.PRD_TYPESENSE_HOST }}
45+
run: |
46+
uv pip install typesense python-frontmatter markdown beautifulsoup4
47+
python scripts/typesense_indexer.py --force
48+
3849
- name: Deploy to Reflex
3950
id: deploy
4051
run: |

.github/workflows/deploy-stg.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,12 @@ permissions:
1313
contents: read
1414

1515
env:
16+
NODE_OPTIONS: "--max-old-space-size=8192"
1617
FLY_API_TOKEN: ${{ secrets.STG_FLY_API_TOKEN }}
1718
CP_WEB_URL: https://cloud.reflexcorp.run/
1819
CP_BACKEND_URL: https://cloud-29f4f535-4fb8-48b9-8b55-2000f2782aee.fly.dev/
20+
TYPESENSE_HOST: ${{ secrets.STG_TYPESENSE_HOST }}
21+
TYPESENSE_SEARCH_API_KEY: ${{ secrets.STG_TYPESENSE_SEARCH_API_KEY }}
1922

2023
jobs:
2124
deploy:
@@ -37,6 +40,14 @@ jobs:
3740
- name: Update Reflex CLI
3841
run: uv pip install reflex-hosting-cli -U
3942

43+
- name: Index documentation to Typesense
44+
env:
45+
TYPESENSE_ADMIN_API_KEY: ${{ secrets.STG_TYPESENSE_ADMIN_API_KEY }}
46+
TYPESENSE_HOST: ${{ secrets.STG_TYPESENSE_HOST }}
47+
run: |
48+
uv pip install typesense python-frontmatter markdown beautifulsoup4
49+
python scripts/typesense_indexer.py --force
50+
4051
- name: Deploy to Reflex
4152
id: deploy
4253
run: |
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: Typesense Documentation Indexing
2+
3+
env:
4+
TELEMETRY_ENABLED: false
5+
NODE_OPTIONS: "--max_old_space_size=8192"
6+
7+
on:
8+
workflow_dispatch:
9+
inputs:
10+
force_reindex:
11+
description: "Force complete reindexing"
12+
type: boolean
13+
default: false
14+
15+
permissions:
16+
contents: read
17+
18+
defaults:
19+
run:
20+
shell: bash
21+
22+
jobs:
23+
index-docs:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v4
27+
28+
- name: Install the latest version of uv
29+
uses: astral-sh/setup-uv@v6
30+
with:
31+
python-version: "3.11"
32+
activate-environment: true
33+
34+
- name: Install indexing dependencies
35+
run: |
36+
uv pip install typesense python-frontmatter markdown beautifulsoup4
37+
38+
- name: Run Typesense indexing
39+
env:
40+
TYPESENSE_ADMIN_API_KEY: ${{ secrets.TYPESENSE_ADMIN_API_KEY }}
41+
run: |
42+
python scripts/typesense_indexer.py
43+
44+
- name: Verify indexing coverage and completeness
45+
env:
46+
TYPESENSE_SEARCH_API_KEY: ${{ secrets.TYPESENSE_SEARCH_API_KEY }}
47+
run: |
48+
echo "=== INDEXING VERIFICATION SUMMARY ==="
49+
echo "The indexing script includes comprehensive verification that:"
50+
echo "✅ All markdown files in /docs are found and processed"
51+
echo "✅ No files are skipped or fail processing"
52+
echo "✅ Section-by-section coverage is 100%"
53+
echo "✅ Final Typesense count matches processed documents"
54+
echo ""
55+
echo "If any markdown files are missing or fail to index, the script will:"
56+
echo "❌ Exit with error code 1"
57+
echo "❌ Report specific failed files and reasons"
58+
echo "❌ Show detailed section breakdown of coverage"
59+
echo ""
60+
echo "Performing additional search verification..."
61+
python -c "
62+
import typesense
63+
client = typesense.Client({
64+
'nodes': [{'host': 'z2mi3hyewokc16a4p-1.a1.typesense.net', 'port': '443', 'protocol': 'https'}],
65+
'api_key': '${{ secrets.TYPESENSE_SEARCH_API_KEY }}',
66+
'connection_timeout_seconds': 60
67+
})
68+
result = client.collections['docs'].documents.search({'q': 'reflex', 'query_by': 'title,content'})
69+
print(f'✅ Search verification: Found {result[\"found\"]} documents for \"reflex\" query')
70+
71+
# Test different sections
72+
sections = ['getting_started', 'library', 'hosting', 'events', 'styling']
73+
for section in sections:
74+
result = client.collections['docs'].documents.search({
75+
'q': section,
76+
'query_by': 'section,title,content',
77+
'per_page': 1
78+
})
79+
print(f'✅ Section \"{section}\": {result[\"found\"]} searchable documents')
80+
"

.github/workflows/unit_tests.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,11 @@ jobs:
5959

6060
- name: Run unit tests
6161
run: pytest tests
62+
63+
- name: Upload test failure videos
64+
if: failure()
65+
uses: actions/upload-artifact@v4
66+
with:
67+
name: playwright-videos-${{ matrix.os }}-${{ matrix.python-version }}
68+
path: test-videos/
69+
if-no-files-found: ignore

.vscode/launch.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@
66
"configurations": [
77
{
88
"name": "Reflex Web",
9-
"type": "python",
9+
"type": "debugpy",
1010
"request": "launch",
1111
"module": "reflex",
1212
"args": "run",
1313
"justMyCode": true,
1414
"cwd": "${workspaceFolder}",
15+
"env": {"CI": "1"},
1516
}
1617
]
1718
}

assets/blog/080.png

1.95 MB
Loading
361 KB
Loading

0 commit comments

Comments
 (0)