Ajout build et deploy
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
name: Tests
|
name: CI/CD Pipeline
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@@ -13,3 +13,11 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
chmod +x tests.sh
|
chmod +x tests.sh
|
||||||
./tests.sh
|
./tests.sh
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
needs: test
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Déployer le site
|
||||||
|
run: docker compose up -d --build
|
||||||
2
Dockerfile
Normal file
2
Dockerfile
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
FROM nginx:alpine
|
||||||
|
COPY index.html /usr/share/nginx/html/
|
||||||
6
docker-compose.yml
Normal file
6
docker-compose.yml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
services:
|
||||||
|
mon-site:
|
||||||
|
build: .
|
||||||
|
container_name: site-eleve14
|
||||||
|
ports:
|
||||||
|
- "9470:80"
|
||||||
@@ -5,6 +5,7 @@
|
|||||||
<title>Mon Site DevOps</title>
|
<title>Mon Site DevOps</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
<h1>Bienvenue sur mon site</h1>
|
||||||
<p>Déployé automatiquement avec CI/CD !</p>
|
<p>Déployé automatiquement avec CI/CD !</p>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
Reference in New Issue
Block a user