Add Gitea Actions CI/CD deploy workflow
All checks were successful
Deploy / deploy (push) Successful in 53s
All checks were successful
Deploy / deploy (push) Successful in 53s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
29
.gitea/workflows/deploy.yml
Normal file
29
.gitea/workflows/deploy.yml
Normal file
@@ -0,0 +1,29 @@
|
||||
name: Deploy
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
|
||||
- name: Build frontend
|
||||
run: cd client && npm ci && npm run build
|
||||
|
||||
- name: Deploy to app directory
|
||||
run: |
|
||||
rsync -a --delete client/dist/ /opt/apps/marketing-app/client/dist/
|
||||
rsync -a server/ /opt/apps/marketing-app/server/ --exclude node_modules --exclude '*.db' --exclude uploads --exclude .env
|
||||
|
||||
- name: Install production deps
|
||||
run: cd /opt/apps/marketing-app/server && npm ci --production
|
||||
|
||||
- name: Restart service
|
||||
run: sudo systemctl restart marketing-app
|
||||
Reference in New Issue
Block a user