Skip to content

Commit a285162

Browse files
esteiningerclaude
andcommitted
fix: use synced openapi.json instead of downloading from production
The workflow was downloading openapi.json from production API, which caused it to skip publishing since the version was unchanged. Now it uses the synced file from server repo first, only downloading from production as a fallback if the synced file is missing. This fixes the chicken-and-egg problem where server changes weren't reflected in the SDK until they were deployed to production. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 58a6b24 commit a285162

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

.github/workflows/sync-and-publish.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,16 @@ jobs:
4141
python -m pip install --upgrade pip
4242
pip install build twine setuptools wheel
4343
44-
- name: Download OpenAPI Spec
45-
run: curl -s https://api.mixpeek.com/docs/openapi.json -o openapi.json
44+
- name: Use synced OpenAPI Spec (or download as fallback)
45+
run: |
46+
if [ -f "openapi.json" ]; then
47+
echo "✅ Using synced openapi.json from server repo"
48+
echo "📄 File size: $(wc -c < openapi.json) bytes"
49+
else
50+
echo "⚠️ No synced openapi.json found, downloading from production..."
51+
curl -s https://api.mixpeek.com/docs/openapi.json -o openapi.json
52+
echo "📥 Downloaded from production API"
53+
fi
4654
4755
- name: Extract version from OpenAPI spec
4856
id: get-version

0 commit comments

Comments
 (0)