diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 9f586ec..7a0e63f 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -17,6 +17,22 @@ jobs: cache: npm - run: npm ci + + - name: Force TinaCloud schema re-index + run: | + echo "Triggering TinaCloud schema refresh..." + curl -s -X POST \ + "https://content.tinajs.io/db/${TINA_PUBLIC_CLIENT_ID}/reset/main?refreshSchema=true" \ + -H "X-API-KEY: ${TINA_TOKEN}" \ + -H "Content-Type: application/json" \ + -o /tmp/tina-reset.json + cat /tmp/tina-reset.json + echo "Waiting 60s for TinaCloud to re-index..." + sleep 60 + env: + TINA_PUBLIC_CLIENT_ID: ${{ secrets.TINA_PUBLIC_CLIENT_ID }} + TINA_TOKEN: ${{ secrets.TINA_TOKEN }} + - run: npm run build env: TINA_PUBLIC_CLIENT_ID: ${{ secrets.TINA_PUBLIC_CLIENT_ID }} diff --git a/package.json b/package.json index 4dec62b..4107839 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "type": "module", "scripts": { "dev": "tinacms dev -c \"vite\"", - "build": "tinacms build && node scripts/sync-blog.mjs && node scripts/copy-pages.mjs && node scripts/generate-sitemap.mjs && tsc -b && vite build && node scripts/prerender.mjs", + "build": "tinacms build --skip-cloud-checks && node scripts/sync-blog.mjs && node scripts/copy-pages.mjs && node scripts/generate-sitemap.mjs && tsc -b && vite build && node scripts/prerender.mjs", "lint": "eslint .", "preview": "vite preview", "sync-blog": "node scripts/sync-blog.mjs",