Files
bootstrap-auth-server/.gitea/workflows/deploy.yml
Aditya Gupta 34041089d7
All checks were successful
Deployment Pipeline / deploy (push) Successful in 4m45s
Merge branch 'master' of git.adityagupta.dev:sortedcord/bootstrap-auth-server
2026-06-25 13:32:43 +05:30

37 lines
1.0 KiB
YAML

name: Deployment Pipeline
on:
push:
branches:
- master
jobs:
deploy:
runs-on: production
steps:
- name: Checkout Code
run: |
git config --global --add safe.directory '*'
rm -rf * .git || true
git clone --depth 1 $GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git .
- name: Build Docker Image
run: docker build -t bootstrap-auth-server:latest .
- name: Stop and Remove Existing Container
run: |
docker stop auth-server || true
docker rm auth-server || true
- name: Run New Container
run: |
# We map a local volume /opt/bootstrap-auth-server/data to persist the SQLite DB across deployments
docker run -d \
--name auth-server \
--restart unless-stopped \
-p 3000:3000 \
-e SERVER_PORT=3000 \
-v /opt/bootstrap-auth-server/data:/app/data \
-e DATABASE_URL="sqlite:///app/data/data.db?mode=rwc" \
bootstrap-auth-server:latest