-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (34 loc) · 1.04 KB
/
frontend-dev.yml
File metadata and controls
42 lines (34 loc) · 1.04 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
41
42
name: Frontend CI
permissions:
contents: read
on:
push:
branches: [ "develop" ]
pull_request:
branches: [ "develop" ]
jobs:
build:
runs-on: ubuntu-latest
env:
container_react: docker-ngen-frontend-1
steps:
- uses: actions/checkout@v3
- name: Build develop docker container for Vite frontend
run: |
cd docker
cp .env/ngen.dev.env.example .env/ngen.dev.env
docker compose -f docker-compose-dev.yml build ngen-frontend
docker compose -f docker-compose-dev.yml up -d ngen-frontend
# Test if react container is running
max_retries=30
retries=0
while [[ "$(docker inspect -f '{{.State.Running}}' "$container_react")" != "true" ]]; do
retries=$((retries + 1))
if [ $retries -ge $max_retries ]; then
echo "Container '$container_react' did not start within the timeout."
exit 1
fi
sleep 1
done
- name: Run Vite build
run: docker exec "$container_react" npm run build