From 5b1832b84e590af719a76712923674006bb03492 Mon Sep 17 00:00:00 2001 From: samyw10 <97761482+samyw10@users.noreply.github.com> Date: Fri, 5 Apr 2024 15:27:04 -0400 Subject: [PATCH 1/8] config ci cd --- .github/workflows/deploy.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..c0d259b --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,28 @@ +name: CI/CD Pipeline for Nginx Router + +on: + push: + branches: [ main ] + paths: + - 'nginx/**' + +jobs: + build_and_push_nginx: + runs-on: ubuntu-latest + steps: + - name: Check Out Repo + uses: actions/checkout@v2 + + - name: Log in to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and Push Docker image for Router + uses: docker/build-push-action@v2 + with: + context: ./nginx + file: ./nginx/Dockerfile + push: true + tags: ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_ROUTER_REPO }}:latest From 0432610c1ba76f9b8f0e0a48068e7e000d4ad788 Mon Sep 17 00:00:00 2001 From: samyw10 <97761482+samyw10@users.noreply.github.com> Date: Fri, 5 Apr 2024 15:39:24 -0400 Subject: [PATCH 2/8] test ci cd --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b000ce6..f06ab4c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# EvalueTonSavoir +# EvalueTonSavoir t EvalueTonSavoir est une plateforme open source et auto-hébergée qui poursuit le développement du code provenant de https://github.com/ETS-PFE004-Plateforme-sondage-minitest. Cette plateforme minimaliste est conçue comme un outil d'apprentissage et d'enseignement, offrant une solution simple et efficace pour la création de quiz utilisant le format GIFT, similaire à Moodle. From b0ba4e9bafb71e92c617823ebb4ec573e828d5be Mon Sep 17 00:00:00 2001 From: samyw10 <97761482+samyw10@users.noreply.github.com> Date: Fri, 5 Apr 2024 15:41:21 -0400 Subject: [PATCH 3/8] test ci cd --- .github/workflows/deploy.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index c0d259b..92c3133 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -2,9 +2,7 @@ name: CI/CD Pipeline for Nginx Router on: push: - branches: [ main ] - paths: - - 'nginx/**' + branches: [ deploy ] jobs: build_and_push_nginx: From 23acde66ba9c229ac7a6bb23b79561de0b80456a Mon Sep 17 00:00:00 2001 From: samyw10 <97761482+samyw10@users.noreply.github.com> Date: Fri, 5 Apr 2024 15:42:37 -0400 Subject: [PATCH 4/8] test ci cd --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 92c3133..768934c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -2,7 +2,7 @@ name: CI/CD Pipeline for Nginx Router on: push: - branches: [ deploy ] + branches: [ pipeline ] jobs: build_and_push_nginx: From 7e515504a73d4f9a537e3518109fce915753dbb0 Mon Sep 17 00:00:00 2001 From: samyw10 <97761482+samyw10@users.noreply.github.com> Date: Fri, 5 Apr 2024 16:01:17 -0400 Subject: [PATCH 5/8] config ci cd frontend et backend --- .github/workflows/backend-deploy.yml | 22 ++++++++++++++++++++++ .github/workflows/frontend-deploy.yml | 22 ++++++++++++++++++++++ README.md | 2 +- 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/backend-deploy.yml create mode 100644 .github/workflows/frontend-deploy.yml diff --git a/.github/workflows/backend-deploy.yml b/.github/workflows/backend-deploy.yml new file mode 100644 index 0000000..3d590ea --- /dev/null +++ b/.github/workflows/backend-deploy.yml @@ -0,0 +1,22 @@ +name: Build and Deploy Backend + +on: + push: + branches: + - pipeline + paths: + - 'server/**' + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Build and push Docker image for Backend + uses: docker/build-push-action@v2 + with: + context: ./server + file: ./server/Dockerfile + push: true + tags: ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_BACKEND_REPO }}:latest diff --git a/.github/workflows/frontend-deploy.yml b/.github/workflows/frontend-deploy.yml new file mode 100644 index 0000000..3467fef --- /dev/null +++ b/.github/workflows/frontend-deploy.yml @@ -0,0 +1,22 @@ +name: Build and Deploy Frontend + +on: + push: + branches: + - pipeline + paths: + - 'client/**' + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Build and push Docker image for Frontend + uses: docker/build-push-action@v2 + with: + context: ./client + file: ./client/Dockerfile + push: true + tags: ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_FRONTEND_REPO }}:latest diff --git a/README.md b/README.md index f06ab4c..ae7013a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# EvalueTonSavoir t +# EvalueTonSavoir EvalueTonSavoir est une plateforme open source et auto-hébergée qui poursuit le développement du code provenant de https://github.com/ETS-PFE004-Plateforme-sondage-minitest. Cette plateforme minimaliste est conçue comme un outil d'apprentissage et d'enseignement, offrant une solution simple et efficace pour la création de quiz utilisant le format GIFT, similaire à Moodle. From b75b6ceb50f05dca5b33f3f180a98867c1032ff8 Mon Sep 17 00:00:00 2001 From: samyw10 <97761482+samyw10@users.noreply.github.com> Date: Fri, 5 Apr 2024 16:04:25 -0400 Subject: [PATCH 6/8] config ci cd frontend et backend --- .github/workflows/backend-deploy.yml | 5 +---- .github/workflows/frontend-deploy.yml | 6 ++---- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/backend-deploy.yml b/.github/workflows/backend-deploy.yml index 3d590ea..c5ac63d 100644 --- a/.github/workflows/backend-deploy.yml +++ b/.github/workflows/backend-deploy.yml @@ -2,10 +2,7 @@ name: Build and Deploy Backend on: push: - branches: - - pipeline - paths: - - 'server/**' + branches: [ pipeline ] jobs: build: diff --git a/.github/workflows/frontend-deploy.yml b/.github/workflows/frontend-deploy.yml index 3467fef..2e14801 100644 --- a/.github/workflows/frontend-deploy.yml +++ b/.github/workflows/frontend-deploy.yml @@ -2,10 +2,8 @@ name: Build and Deploy Frontend on: push: - branches: - - pipeline - paths: - - 'client/**' + branches: [ pipeline ] + jobs: build: From 330a583b1b51899e7c5ee33378d56f7fb473993b Mon Sep 17 00:00:00 2001 From: samyw10 <97761482+samyw10@users.noreply.github.com> Date: Fri, 5 Apr 2024 16:16:02 -0400 Subject: [PATCH 7/8] config ci cd frontend et backend --- .github/workflows/backend-deploy.yml | 31 ++++++++++++++++---------- .github/workflows/frontend-deploy.yml | 32 ++++++++++++++++----------- 2 files changed, 38 insertions(+), 25 deletions(-) diff --git a/.github/workflows/backend-deploy.yml b/.github/workflows/backend-deploy.yml index c5ac63d..84c561c 100644 --- a/.github/workflows/backend-deploy.yml +++ b/.github/workflows/backend-deploy.yml @@ -1,19 +1,26 @@ -name: Build and Deploy Backend +name: CI/CD Pipeline for Backend on: push: - branches: [ pipeline ] + branches: [ pipeline ] jobs: - build: + build_and_push_backend: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - - name: Build and push Docker image for Backend - uses: docker/build-push-action@v2 - with: - context: ./server - file: ./server/Dockerfile - push: true - tags: ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_BACKEND_REPO }}:latest + - name: Check Out Repo + uses: actions/checkout@v2 + + - name: Log in to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and Push Docker image for Backend + uses: docker/build-push-action@v2 + with: + context: ./server + file: ./server/Dockerfile + push: true + tags: ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_BACKEND_REPO }}:latest diff --git a/.github/workflows/frontend-deploy.yml b/.github/workflows/frontend-deploy.yml index 2e14801..3a795d1 100644 --- a/.github/workflows/frontend-deploy.yml +++ b/.github/workflows/frontend-deploy.yml @@ -1,20 +1,26 @@ -name: Build and Deploy Frontend +name: CI/CD Pipeline for Frontend on: push: - branches: [ pipeline ] - + branches: [ pipeline ] jobs: - build: + build_and_push_frontend: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - - name: Build and push Docker image for Frontend - uses: docker/build-push-action@v2 - with: - context: ./client - file: ./client/Dockerfile - push: true - tags: ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_FRONTEND_REPO }}:latest + - name: Check Out Repo + uses: actions/checkout@v2 + + - name: Log in to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and Push Docker image for Frontend + uses: docker/build-push-action@v2 + with: + context: ./client + file: ./client/Dockerfile + push: true + tags: ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_FRONTEND_REPO }}:latest From 4c72fb4a9d06e807e871c7988ea57b0077240115 Mon Sep 17 00:00:00 2001 From: samyw10 <97761482+samyw10@users.noreply.github.com> Date: Fri, 5 Apr 2024 16:19:57 -0400 Subject: [PATCH 8/8] config ci cd frontend et backend pour main --- .github/workflows/backend-deploy.yml | 2 +- .github/workflows/deploy.yml | 2 +- .github/workflows/frontend-deploy.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/backend-deploy.yml b/.github/workflows/backend-deploy.yml index 84c561c..8e737ed 100644 --- a/.github/workflows/backend-deploy.yml +++ b/.github/workflows/backend-deploy.yml @@ -2,7 +2,7 @@ name: CI/CD Pipeline for Backend on: push: - branches: [ pipeline ] + branches: [ main ] jobs: build_and_push_backend: diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 768934c..a74566c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -2,7 +2,7 @@ name: CI/CD Pipeline for Nginx Router on: push: - branches: [ pipeline ] + branches: [ main ] jobs: build_and_push_nginx: diff --git a/.github/workflows/frontend-deploy.yml b/.github/workflows/frontend-deploy.yml index 3a795d1..01a7a2d 100644 --- a/.github/workflows/frontend-deploy.yml +++ b/.github/workflows/frontend-deploy.yml @@ -2,7 +2,7 @@ name: CI/CD Pipeline for Frontend on: push: - branches: [ pipeline ] + branches: [ main ] jobs: build_and_push_frontend: