feat: native deploy workflow without SSH
Some checks failed
CI / build-and-test (push) Has been cancelled
CI / build-and-test (pull_request) Has been cancelled

This commit is contained in:
sokol
2026-02-20 13:55:53 +03:00
parent c735d7318f
commit 9e313f5b86
2 changed files with 81 additions and 32 deletions

View File

@@ -32,18 +32,19 @@
**Triggers:** Push to `main` branch
**Jobs:**
- SSH to deployment server
- Pull latest code
- Update Docker containers
- Clean up old images
- Build React application
- Build Docker image locally
- Create docker-compose.yml configuration
- Deploy container on Gitea runner (port 11088)
- Health check to verify application is running
- Cleanup old Docker images
**Required Secrets:**
- `DEPLOY_HOST` - Server hostname/IP
- `DEPLOY_USERNAME` - SSH username
- `DEPLOY_KEY` - SSH private key
**No SSH required** - Everything runs natively on the Gitea Actions runner!
**Optional Secrets:**
- `DEPLOY_PORT` - SSH port (default: 22)
**Output:**
- Application available at: `http://<gitea-server>:11088`
- Container auto-restarts on failure
- Health check ensures successful deployment
## Setup Instructions
@@ -54,18 +55,18 @@ Make sure Actions is enabled in your Gitea instance:
ENABLED = true
```
### 2. Configure Secrets
Go to your repository → Settings → Secrets and add:
### 2. Configure Runner
Ensure your Gitea runner has Docker and docker-compose installed:
**For Deployment:**
```
DEPLOY_HOST=your-server.com
DEPLOY_USERNAME=deploy
DEPLOY_KEY=<paste-ssh-private-key>
DEPLOY_PORT=22
```bash
# Install Docker
curl -fsSL https://get.docker.com | sh
# Install docker-compose
sudo apt-get install docker-compose-plugin
```
**No Docker secrets needed** - images are built locally and downloaded as artifacts!
**No secrets required** - Everything runs on the runner!
## Workflow Files Location
`.gitea/workflows/`