docs: update READMEs with CI/CD guide for teammates

This commit is contained in:
Arash_M
2026-06-09 15:39:43 +03:30
parent 02573f1643
commit b88ed1c2ce
2 changed files with 54 additions and 45 deletions
+28 -16
View File
@@ -1,39 +1,51 @@
# Deploy — audio-voice-converter
اسکریپت‌های CI/CD پروژه `audio-voice-converter`.
اسکریپت‌های CI/CD برای sync کردن extensionها از source و push به Gitea.
## ساختار
```
deploy/
├── README.md ← این فایل
├── README.md
└── scripts/
├── sync.ps1 ← کپی فایل‌ها از source به repo
└── push.ps1 ← git commit + push به Gitea
├── sync.ps1 ← کپی فایل‌ها از source dirs به repo
└── push.ps1 ← git commit + push به Gitea
```
## پیش‌نیازها
- متغیر محیطی `AUDIO_SOURCE_ROOT` تنظیم شده باشه (مسیر پوشه‌ی source)
- دسترسی git به remote (credential یا SSH key)
## یک‌بار (اولین بار)
```powershell
$env:AUDIO_SOURCE_ROOT = "D:\projects\google_meet_captions"
git clone https://git.darkreader.ir/arash/audio-voice-converter.git
cd audio-voice-converter
```
## استفاده
## هر بار که extension آپدیت شد
```powershell
# فقط sync (کپی فایل‌ها بدون push)
.\scripts\sync.ps1
# مسیر پوشه‌ای که extensionهای source توشن
$env:AUDIO_SOURCE_ROOT = "مسیر پوشه source"
# sync + commit + push
.\scripts\sync.ps1 | .\scripts\push.ps1
# sync فایل‌ها از source
.\deploy\scripts\sync.ps1
# یا مستقیم push (اگر sync قبلاً انجام شده)
.\scripts\push.ps1
# commit + push به Gitea
.\deploy\scripts\push.ps1
```
## گزینه‌های push.ps1
```powershell
.\deploy\scripts\push.ps1 # پیام خودکار با timestamp
.\deploy\scripts\push.ps1 -Message "fix: ..." # پیام دلخواه
.\deploy\scripts\push.ps1 -DryRun # فقط نمایش، بدون push
```
## نکات
- `$env:AUDIO_SOURCE_ROOT` نباید توی هیچ فایلی ذخیره بشه — هر بار در terminal تنظیم کن
- `push.ps1` با `--force` پوش میکنه چون این repo snapshot هست نه تاریخچه
- آدرس Gitea: `https://git.darkreader.ir`
## جریان کلی
```