main
Some checks failed
CI / build (push) Successful in 1m16s
Deploy Backend / build-and-deploy (push) Failing after 13m4s

This commit is contained in:
2026-02-07 00:20:27 +03:00
commit 02ecfada63
111 changed files with 23359 additions and 0 deletions

32
.github/workflows/ci.yml vendored Normal file
View File

@@ -0,0 +1,32 @@
name: CI
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Generate Prisma Client
run: npx prisma generate
- name: Lint
run: npm run lint
- name: Build
run: npm run build

43
.github/workflows/deploy.yml vendored Normal file
View File

@@ -0,0 +1,43 @@
name: Deploy Backend
run-name: ${{ gitea.actor }} is deploying backend 🚀
on:
push:
branches:
- main
- master
jobs:
build-and-deploy:
runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:act-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Build and Push Docker Image
run: |
docker build -t skript-be .
- name: Stop and Remove Existing Container
run: |
docker stop backend-skript-container || true
docker rm backend-skript-container || true
- name: Run New Container
run: |
docker run -d \
--name backend-skript-container \
--restart unless-stopped \
--network gitea-server_gitea \
-p 1806:3000 \
-e DATABASE_URL='${{ secrets.DATABASE_URL }}' \
-e JWT_SECRET='${{ secrets.JWT_SECRET }}' \
-e REDIS_HOST='redis' \
-e REDIS_PORT='6379' \
skript-be
- name: Cleanup
run: docker image prune -f