generated from ABI-Interoperability-Thesis/webservice-template-nodejs
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (33 loc) · 937 Bytes
/
deploy-test-env.yml
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
43
44
name: Build and Deploy
on:
push:
branches:
- dev
jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Install Dependencies
run: npm ci
- name: Run Unit Tests
run: npm test
build:
runs-on: ubuntu-latest
needs: tests
if: success()
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Build Docker Image
run: docker build -t preprocessing-webservice:ci .
- name: Stop Existing Container
run: docker stop preprocessing-webservice || true
- name: Remove Existing Container
run: docker rm preprocessing-webservice || true
- name: Run Docker Container
run: docker run -d -p 3010:3000 --name preprocessing-webservice \
-e PORT=3000 \
-e ENV=dev \
preprocessing-webservice:ci