Skip to content

Commit 3a41645

Browse files
feat: add GitHub Actions CI workflow
1 parent 354289c commit 3a41645

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/ci.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Build and Deploy
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Build Docker image
17+
run: docker build -t gdg-docs:latest .
18+
19+
- name: Test Docker image
20+
run: |
21+
docker run -d --name test-container -p 8080:8080 gdg-docs:latest
22+
sleep 10
23+
curl -f http://localhost:8080 || exit 1
24+
docker stop test-container

0 commit comments

Comments
 (0)