Add Gitea Actions for automatic deployment
Some checks failed
Deploy Borgmatic Configuration / Deploy to Production Server (push) Has been cancelled
Some checks failed
Deploy Borgmatic Configuration / Deploy to Production Server (push) Has been cancelled
Added workflow to automatically deploy configuration changes when pushing to main branch. Includes comprehensive documentation for setting up SSH keys, configuring secrets, and troubleshooting deployments. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
27
.gitea/workflows/deploy.yml
Normal file
27
.gitea/workflows/deploy.yml
Normal file
@@ -0,0 +1,27 @@
|
||||
name: Deploy Borgmatic Configuration
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
name: Deploy to Production Server
|
||||
|
||||
steps:
|
||||
- name: Deploy via SSH
|
||||
uses: appleboy/ssh-action@v1.0.3
|
||||
with:
|
||||
host: ${{ secrets.SERVER_HOST }}
|
||||
username: ${{ secrets.SERVER_USER }}
|
||||
key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
port: ${{ secrets.SSH_PORT || 22 }}
|
||||
script: |
|
||||
cd /opt/borgmatic
|
||||
echo "📥 Pulling latest changes from Git..."
|
||||
git pull origin main
|
||||
echo "🔧 Installing configuration..."
|
||||
make install
|
||||
echo "✅ Deployment completed successfully"
|
||||
Reference in New Issue
Block a user