Ajout build et deploy
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
name: Tests
|
||||
name: CI/CD Pipeline
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -12,4 +12,12 @@ jobs:
|
||||
- name: Lancer les tests
|
||||
run: |
|
||||
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>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Bienvenue sur mon site</h1>
|
||||
<p>Déployé automatiquement avec CI/CD !</p>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user