Skip to content

update

update #3

Workflow file for this run

name: Test Docker Compose
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test_docker:
runs-on: ubuntu-latest
steps:
# Step 1: Checkout the code from the repository
- uses: actions/checkout@v4
# Step 2: Use Docker Compose Action to build and run services
- name: Run docker-compose
uses: hoverkraft-tech/[email protected]
with:
compose-file: "./docker-compose.yml"
# Step 3: Wait for services to initialize (optional)
- name: Wait for services to initialize
run: sleep 20
# Step 4: Health check for VitePress service (port 3001)
- name: Check VitePress health
run: |
curl -f http://localhost:3001 || exit 1
# Step 5: Health check for HTTP server (port 4000)
- name: Check HTTP server health
run: |
curl -f http://localhost/http-server/ || exit 1
# Step 6: Health check for Nginx service (port 80)
- name: Check Nginx health
run: |
curl -f http://localhost || exit 1