54 lines
1.5 KiB
Markdown
54 lines
1.5 KiB
Markdown
# Deploy — audio-voice-converter
|
|
|
|
اسکریپتهای CI/CD برای sync کردن extensionها از source و push به Gitea.
|
|
|
|
## ساختار
|
|
|
|
```
|
|
deploy/
|
|
├── README.md
|
|
└── scripts/
|
|
├── sync.ps1 ← کپی فایلها از source dirs به repo
|
|
└── push.ps1 ← git commit + push به Gitea
|
|
```
|
|
|
|
## یکبار (اولین بار)
|
|
|
|
```powershell
|
|
git clone https://git.darkreader.ir/arash/audio-voice-converter.git
|
|
cd audio-voice-converter
|
|
```
|
|
|
|
## هر بار که extension آپدیت شد
|
|
|
|
```powershell
|
|
# مسیر پوشهای که extensionهای source توشن
|
|
$env:AUDIO_SOURCE_ROOT = "مسیر پوشه source"
|
|
|
|
# sync فایلها از source
|
|
.\deploy\scripts\sync.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`
|
|
|
|
## جریان کلی
|
|
|
|
```
|
|
source dirs → sync.ps1 → repo files → push.ps1 → Gitea
|
|
```
|