point production at mathapi.tadrisino2.ir and add a one-command deploy

The API moved to mathapi.tadrisino2.ir on 2026-09-26; api.math.tadrisino2.ir
no longer resolves. .env.production is the only place that names it.

deploy.sh fetches, runs npm ci and the type-check, builds into dist.next and
swaps it in only when everything succeeded, so the site is never served half
a build. The previous build stays in dist.prev for rollback, and a
hand-edited dist/config.js on the server survives the release.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-27 01:12:39 +03:30
parent 348bfecea6
commit 0ca7b39e49
4 changed files with 62 additions and 4 deletions

3
.gitignore vendored
View File

@@ -5,3 +5,6 @@ dist
.env
.env.local
.env.*.local
dist.next
dist.prev
.deploy-backups