feat: native deploy workflow without SSH
This commit is contained in:
@@ -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/`
|
||||
|
||||
Reference in New Issue
Block a user