This commit is contained in:
43
.gitea/workflows/ci.yaml
Normal file
43
.gitea/workflows/ci.yaml
Normal file
@@ -0,0 +1,43 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
runs-on: [finanzen]
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Show environment
|
||||
run: |
|
||||
whoami
|
||||
pwd
|
||||
node -v || true
|
||||
npm -v || true
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
|
||||
- name: Prisma generate
|
||||
run: npx prisma generate
|
||||
|
||||
- name: Build app
|
||||
run: npm run build
|
||||
|
||||
- name: Run Prisma migrations
|
||||
run: npx prisma migrate deploy
|
||||
|
||||
- name: Seeding demo data...
|
||||
run: npx prisma db seed
|
||||
|
||||
- name: Restart service
|
||||
run: sudo systemctl restart finanzen-app
|
||||
|
||||
- name: Show service status
|
||||
run: sudo systemctl --no-pager --full status finanzen-app
|
||||
Reference in New Issue
Block a user