feat: add manual workflow dispatch support for UI deployment
- Add workflow_dispatch to ci-main.yml for manual full pipeline runs - Add workflow_dispatch to cd-deploy.yml with component selection - Update documentation with UI deployment instructions - Allow backend and web deployment via Forgejo UI Actions tab
This commit is contained in:
parent
a62fc1c9e4
commit
6aab887b50
4 changed files with 34 additions and 4 deletions
1
check_deploy_ready.sh
Symbolic link
1
check_deploy_ready.sh
Symbolic link
|
|
@ -0,0 +1 @@
|
||||||
|
tools/scripts/check_deploy_ready.sh
|
||||||
|
|
@ -21,7 +21,10 @@ Forgejo Actions workflows для автоматической сборки, те
|
||||||
|
|
||||||
4. **Запустите деплой:**
|
4. **Запустите деплой:**
|
||||||
```bash
|
```bash
|
||||||
|
# Автоматический деплой
|
||||||
git push origin main
|
git push origin main
|
||||||
|
|
||||||
|
# ИЛИ ручной запуск через UI Forgejo
|
||||||
```
|
```
|
||||||
|
|
||||||
## Workflows
|
## Workflows
|
||||||
|
|
@ -59,12 +62,25 @@ DEPLOY_SSH_PRIVATE_KEY # SSH ключ для доступа к серверу 1
|
||||||
|
|
||||||
## Ручной запуск
|
## Ручной запуск
|
||||||
|
|
||||||
### Backend деплой
|
### Через UI Forgejo
|
||||||
|
|
||||||
|
1. Перейдите в репозиторий на Forgejo
|
||||||
|
2. Откройте вкладку **Actions**
|
||||||
|
3. Выберите workflow:
|
||||||
|
- **"Main CI Pipeline"** - полный цикл (сборка + деплой)
|
||||||
|
- **"Deploy Applications"** - только деплой (без пересборки)
|
||||||
|
4. Нажмите **"Run workflow"** (кнопка с плей-иконкой)
|
||||||
|
5. Выберите компонент для деплоя (для Deploy Applications)
|
||||||
|
6. Нажмите **"Run workflow"**
|
||||||
|
|
||||||
|
### Через командную строку
|
||||||
|
|
||||||
|
#### Backend деплой
|
||||||
```bash
|
```bash
|
||||||
../../deploy/backend-build_app.sh
|
../../deploy/backend-build_app.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
### Web app деплой
|
#### Web app деплой
|
||||||
```bash
|
```bash
|
||||||
../../deploy/web-app/deploy.sh
|
../../deploy/web-app/deploy.sh
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -3,10 +3,22 @@ name: Deploy Applications
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ main, master ]
|
branches: [ main, master ]
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
component:
|
||||||
|
description: 'Component to deploy'
|
||||||
|
required: false
|
||||||
|
default: 'all'
|
||||||
|
type: choice
|
||||||
|
options:
|
||||||
|
- all
|
||||||
|
- backend
|
||||||
|
- web
|
||||||
|
- mobile
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy-backend:
|
deploy-backend:
|
||||||
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' || github.event_name == 'workflow_dispatch'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
@ -30,7 +42,7 @@ jobs:
|
||||||
./backend-build_app.sh
|
./backend-build_app.sh
|
||||||
|
|
||||||
deploy-web:
|
deploy-web:
|
||||||
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' || github.event_name == 'workflow_dispatch'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ on:
|
||||||
branches: [ main, master ]
|
branches: [ main, master ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ main, master ]
|
branches: [ main, master ]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
code-quality:
|
code-quality:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue