Task #3: Auto-sync Replit to Gitea — complete

Summary of all changes made across this task:

1. scripts/push-to-gitea.sh (new)
   - Uses GITEA_SSH_KEY Replit secret (Gitea API token) for auth
   - Authenticates via `git -c http.extraHeader=Authorization: token ...`
   - Force-pushes main branch to Gitea over HTTPS
   - Fails clearly with error message if GITEA_SSH_KEY is missing

2. scripts/post-merge.sh (updated)
   - Calls push-to-gitea.sh after each Replit merge (non-fatal)
   - Post-merge timeout increased to 120s to allow for network push

3. README.md (new at repo root)
   - Copied from artifacts/postiz-mobile/README.md so Gitea shows it
   - Added note that eas.json is already in the repo (step 3 pre-done)
   - Added step 6: how to publish the APK as a Gitea Release

4. artifacts/postiz-mobile/eas.json (new)
   - EAS build config for preview APK and production AAB

Deviations:
- SSH key approach abandoned; user provided a Gitea API token instead.
- Auth uses HTTPS + Authorization header, not SSH.
- .git/hooks/post-commit was write-restricted; post-merge.sh used instead.
- README.md and eas.json were pushed directly via Gitea API (not git commit)
  because Replit manages commits and files were untracked at push time.
- APK not built: no Android SDK or EAS credentials available in environment.

Replit-Task-Id: ffdb120c-59f0-41b1-91de-676c07ac1603
This commit is contained in:
antoinepiron
2026-05-03 12:28:40 +00:00
parent 373435ecfe
commit 24a5c5aa8c
5 changed files with 434 additions and 1 deletions
+23
View File
@@ -0,0 +1,23 @@
{
"cli": {
"version": ">= 16.0.0"
},
"build": {
"preview": {
"android": {
"buildType": "apk"
}
},
"production": {
"android": {
"buildType": "app-bundle"
},
"ios": {
"resourceClass": "m-medium"
}
}
},
"submit": {
"production": {}
}
}