Skip to content

Commit ae87e5c

Browse files
committed
feat: Astro SSR parity, Sanity semantic search, SearchModal, and syndication
1 parent 36da187 commit ae87e5c

52 files changed

Lines changed: 5142 additions & 70 deletions

Some content is hidden

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

‎.github/workflows/ci.yml‎

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,42 @@ jobs:
6464
git diff --stat -- apps/sanity/extract.json
6565
exit 1
6666
fi
67+
68+
preview:
69+
needs: verify
70+
if: github.event_name == 'pull_request' && github.base_ref == 'dev'
71+
runs-on: ubuntu-latest
72+
permissions:
73+
contents: read
74+
pull-requests: write
75+
steps:
76+
- uses: actions/checkout@v4
77+
78+
- uses: pnpm/action-setup@v4
79+
80+
- uses: actions/setup-node@v4
81+
with:
82+
node-version-file: ".nvmrc"
83+
cache: "pnpm"
84+
85+
- name: Install dependencies
86+
run: pnpm install --frozen-lockfile
87+
88+
- name: Generate Sanity Types
89+
run: pnpm typegen
90+
env:
91+
SANITY_STUDIO_PROJECT_ID: hfh83o0w
92+
SANITY_STUDIO_DATASET: dev
93+
94+
- name: Build site (preview)
95+
run: pnpm --filter @codingcatdev/site build
96+
97+
- name: Upload Cloudflare Worker Preview Version
98+
id: upload_preview
99+
run: |
100+
OUTPUT=$(pnpm --filter @codingcatdev/site exec wrangler versions upload --tag "pr-${{ github.event.pull_request.number }}" --message "PR #${{ github.event.pull_request.number }}: ${{ github.event.pull_request.title }}")
101+
echo "$OUTPUT"
102+
env:
103+
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
104+
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID || 'c46bd0f3b9ed47b8692cca098030edbf' }}
105+
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: Deploy Site to Cloudflare Workers
2+
3+
on:
4+
push:
5+
branches: [dev, main]
6+
paths:
7+
- "apps/site/**"
8+
- "packages/**"
9+
- "pnpm-lock.yaml"
10+
- ".github/workflows/deploy-workers.yml"
11+
12+
concurrency:
13+
group: deploy-site-${{ github.ref }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
deploy-dev:
18+
if: github.ref == 'refs/heads/dev'
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- uses: pnpm/action-setup@v4
24+
25+
- uses: actions/setup-node@v4
26+
with:
27+
node-version-file: ".nvmrc"
28+
cache: "pnpm"
29+
30+
- name: Install dependencies
31+
run: pnpm install --frozen-lockfile
32+
33+
- name: Generate Sanity Types
34+
run: pnpm typegen
35+
env:
36+
SANITY_STUDIO_PROJECT_ID: hfh83o0w
37+
SANITY_STUDIO_DATASET: dev
38+
39+
- name: Build site (dev)
40+
run: pnpm --filter @codingcatdev/site build
41+
42+
- name: Deploy to Cloudflare Workers (dev.codingcat.dev)
43+
run: pnpm --filter @codingcatdev/site exec wrangler deploy
44+
env:
45+
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
46+
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID || 'c46bd0f3b9ed47b8692cca098030edbf' }}
47+
48+
deploy-production:
49+
if: github.ref == 'refs/heads/main'
50+
runs-on: ubuntu-latest
51+
steps:
52+
- uses: actions/checkout@v4
53+
54+
- uses: pnpm/action-setup@v4
55+
56+
- uses: actions/setup-node@v4
57+
with:
58+
node-version-file: ".nvmrc"
59+
cache: "pnpm"
60+
61+
- name: Install dependencies
62+
run: pnpm install --frozen-lockfile
63+
64+
- name: Generate Sanity Types
65+
run: pnpm typegen
66+
env:
67+
SANITY_STUDIO_PROJECT_ID: hfh83o0w
68+
SANITY_STUDIO_DATASET: production
69+
70+
- name: Build site (production)
71+
run: pnpm --filter @codingcatdev/site build:production
72+
73+
- name: Deploy to Cloudflare Workers (codingcat.dev)
74+
run: pnpm --filter @codingcatdev/site exec wrangler deploy --env production
75+
env:
76+
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
77+
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID || 'c46bd0f3b9ed47b8692cca098030edbf' }}

‎.gitignore‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,6 @@ yarn-error.log*
3838
!.vscode/mcp.json
3939
# pnpm workspace — root pnpm-lock.yaml is the lockfile
4040
package-lock.json
41+
42+
# agents teamwork
43+
.agents/

‎apps/sanity/extract.json‎

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,137 @@
571571
"dereferencesTo": "podcast"
572572
}
573573
},
574+
{
575+
"name": "syndication",
576+
"type": "document",
577+
"attributes": {
578+
"_id": {
579+
"type": "objectAttribute",
580+
"value": {
581+
"type": "string"
582+
}
583+
},
584+
"_type": {
585+
"type": "objectAttribute",
586+
"value": {
587+
"type": "string",
588+
"value": "syndication"
589+
}
590+
},
591+
"_createdAt": {
592+
"type": "objectAttribute",
593+
"value": {
594+
"type": "string"
595+
}
596+
},
597+
"_updatedAt": {
598+
"type": "objectAttribute",
599+
"value": {
600+
"type": "string"
601+
}
602+
},
603+
"_rev": {
604+
"type": "objectAttribute",
605+
"value": {
606+
"type": "string"
607+
}
608+
},
609+
"target": {
610+
"type": "objectAttribute",
611+
"value": {
612+
"type": "union",
613+
"of": [
614+
{
615+
"type": "inline",
616+
"name": "post.reference"
617+
},
618+
{
619+
"type": "inline",
620+
"name": "podcast.reference"
621+
}
622+
]
623+
},
624+
"optional": true
625+
},
626+
"platform": {
627+
"type": "objectAttribute",
628+
"value": {
629+
"type": "union",
630+
"of": [
631+
{
632+
"type": "string",
633+
"value": "devto"
634+
},
635+
{
636+
"type": "string",
637+
"value": "hashnode"
638+
}
639+
]
640+
},
641+
"optional": true
642+
},
643+
"status": {
644+
"type": "objectAttribute",
645+
"value": {
646+
"type": "union",
647+
"of": [
648+
{
649+
"type": "string",
650+
"value": "pending"
651+
},
652+
{
653+
"type": "string",
654+
"value": "published"
655+
},
656+
{
657+
"type": "string",
658+
"value": "simulated_complete"
659+
},
660+
{
661+
"type": "string",
662+
"value": "failed"
663+
}
664+
]
665+
},
666+
"optional": true
667+
},
668+
"externalUrl": {
669+
"type": "objectAttribute",
670+
"value": {
671+
"type": "string"
672+
},
673+
"optional": true
674+
},
675+
"externalId": {
676+
"type": "objectAttribute",
677+
"value": {
678+
"type": "string"
679+
},
680+
"optional": true
681+
},
682+
"canonicalUrl": {
683+
"type": "objectAttribute",
684+
"value": {
685+
"type": "string"
686+
},
687+
"optional": true
688+
},
689+
"syndicatedAt": {
690+
"type": "objectAttribute",
691+
"value": {
692+
"type": "string"
693+
},
694+
"optional": true
695+
},
696+
"error": {
697+
"type": "objectAttribute",
698+
"value": {
699+
"type": "string"
700+
},
701+
"optional": true
702+
}
703+
}
704+
},
574705
{
575706
"type": "type",
576707
"name": "page.reference",

0 commit comments

Comments
 (0)