Add Gitea Actions workflow for CI/CD
Some checks failed
Build and Deploy to Production / build-and-deploy (push) Has been cancelled
Some checks failed
Build and Deploy to Production / build-and-deploy (push) Has been cancelled
This commit is contained in:
27
.gitea/workflows/deploy.yml
Normal file
27
.gitea/workflows/deploy.yml
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
name: Build and Deploy to Production
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main, master]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-deploy:
|
||||||
|
runs-on: self-hosted
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: bun install
|
||||||
|
|
||||||
|
- name: Build project
|
||||||
|
run: bun run build
|
||||||
|
|
||||||
|
- name: Deploy
|
||||||
|
run: |
|
||||||
|
echo "🚀 Deploying to production..."
|
||||||
|
# Restart the Bun server to pick up new build
|
||||||
|
systemctl restart bun-react || true
|
||||||
|
echo "✅ Deployment complete!"
|
||||||
|
echo "Site is live at: https://schlaustronics.com"
|
||||||
Reference in New Issue
Block a user