Skip to content

Commit 4add4f0

Browse files
github workflow added
1 parent c793066 commit 4add4f0

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

.github/workflows/ci.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- main
77
pull_request:
88

9-
9+
# Set defaults to backend folder for npm commands
1010
defaults:
1111
run:
1212
working-directory: ./backend
@@ -16,24 +16,26 @@ jobs:
1616
runs-on: ubuntu-latest
1717

1818
steps:
19-
19+
2020
- name: Checkout repository
2121
uses: actions/checkout@v3
2222

23-
23+
2424
- name: Setup Node.js
2525
uses: actions/setup-node@v3
2626
with:
2727
node-version: 20
2828

29-
29+
3030
- name: Install dependencies
3131
run: npm install
3232

33+
3334
- name: Build TypeScript
3435
run: npm run build
3536

36-
3737
- name: Build Docker image
3838
run: docker build -t my-api:${{ github.sha }} ./backend
3939

40+
- name: Build and run Docker Compose
41+
run: docker-compose -f ./docker-compose.yml up --build -d

0 commit comments

Comments
 (0)