From b2737e577048bfecbad02667c365570ff2c100db Mon Sep 17 00:00:00 2001 From: Pape Mayel Diagne THIAM Date: Fri, 24 May 2024 19:07:49 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=83=20feat:=20add=20workflow=20cicd=20?= =?UTF-8?q?like=20github=20actions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cicd.yml | 49 ++++++++++++++++++++++++++++++++++++++ docker-compose.yml | 4 ++-- 2 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/cicd.yml diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml new file mode 100644 index 0000000..c06db23 --- /dev/null +++ b/.github/workflows/cicd.yml @@ -0,0 +1,49 @@ +name: cicd template + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + build-deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: Use Node.js 16.x + uses: actions/setup-node@v2 + with: + node-version: 16.x + + - name: Install Dependencies + run: npm install + + - name: Build Project + run: npm run build + + #- name: Deploy to OVH Hosting for example + # uses: SamKirkland/FTP-Deploy-Action@4.3.3 + # with: + # server: ${{ secrets.OVH_FTP_SERVER }} + # username: ${{ secrets.OVH_FTP_USERNAME }} + # password: ${{ secrets.OVH_FTP_PASSWORD }} + # local-dir: ./dist/ + # server-dir: /www/ + + - name: Upload Artifact + uses: actions/upload-artifact@v2 + with: + name: yonebi-version-1 + path: ./dist + + - name: Download Artifact + uses: actions/download-artifact@v2 + with: + name: yonebi-version-1 + path: 'build' diff --git a/docker-compose.yml b/docker-compose.yml index 7a60c62..a852254 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,12 +3,12 @@ services: pgdb: image: postgres:16 - container_name: db-senwata + container_name: db-node-express-template hostname: postgres_db environment: - POSTGRES_USER=postgres - POSTGRES_PASSWORD=postgres - - POSTGRES_DB=senwata + - POSTGRES_DB=node-express-template - POSTGRES_HOST_AUTH_METHOD=trust expose: - 5432