-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (35 loc) · 1.08 KB
/
deploy-demo.yml
File metadata and controls
40 lines (35 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Deploy Demo
on:
push:
branches: ["main"]
jobs:
deploy:
runs-on: self-hosted
environment: demo
steps:
- name: Pull latest code
run: |
set -e
cd /opt/nexuslims-cdcs
echo "=== Pulling latest code (branch: ${{ github.ref_name }}) ==="
git fetch origin
git checkout ${{ github.ref_name }}
git pull origin ${{ github.ref_name }}
- name: Download fixtures (if absent)
run: |
set -e
cd /opt/nexuslims-cdcs/deployment
if [ ! -d "fixtures/demo_data/nx-data" ]; then
./scripts/manage-demo-fixtures.sh download
else
echo "Fixtures already present, skipping download"
fi
- name: Build and restart stack
run: |
set -e
cd /opt/nexuslims-cdcs/deployment
export COMPOSE_FILE="docker-compose.base.yml:docker-compose.demo.yml"
COMPOSE_BAKE=true docker compose build cdcs
docker compose down
docker compose up -d
echo "=== Deploy complete ==="