From fca85bdcaa40847b767e1e732c93a9f2045c92a5 Mon Sep 17 00:00:00 2001 From: "Ibrahima G. Coulibaly" Date: Mon, 24 Jun 2024 00:38:12 +0100 Subject: [PATCH] ci: fix --- .github/workflows/ci.yml | 21 +++----------------- .github/workflows/deploy.yml | 38 ++++++++++++++++++++++++++++++++++++ .idea/workspace.xml | 22 ++++++++++++++------- 3 files changed, 56 insertions(+), 25 deletions(-) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a848dcf..017fe37 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,15 +3,14 @@ name: CI on: push: branches: - - main # or the branch you want to trigger the workflow on + - main pull_request: branches: - main jobs: - build-and-deploy: + build-and-test: runs-on: ubuntu-latest - steps: - name: Checkout code uses: actions/checkout@v3 @@ -19,7 +18,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v3 with: - node-version: '18' # Specify the Node.js version you want to use + node-version: '18' - name: Install dependencies run: npm install @@ -29,17 +28,3 @@ jobs: - name: Build project run: npm run build - - - name: Deploy to Netlify - uses: nwtgck/actions-netlify@v1.2 - with: - publish-dir: ./dist - production-branch: main - deploy-message: ${{ github.event.head_commit.message }} - enable-pull-request-comment: true - enable-commit-comment: true - overwrites-pull-request-comment: true - env: - NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} - NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} - timeout-minutes: 1 diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..ae2de6a --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,38 @@ +name: Deploy + +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: '18' + + - name: Install dependencies + run: npm install + + - name: Build project + run: npm run build + + - name: Deploy to Netlify + uses: nwtgck/actions-netlify@v1.2 + with: + publish-dir: ./dist + production-branch: main + deploy-message: ${{ github.event.head_commit.message }} + enable-pull-request-comment: true + enable-commit-comment: true + overwrites-pull-request-comment: true + env: + NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} + NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} + timeout-minutes: 10 diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 99fa62a..bea8b4a 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -4,10 +4,10 @@