From f03d0ef6cd21e7509f42b0c079b61a01285c1df1 Mon Sep 17 00:00:00 2001 From: kalio007 Date: Mon, 22 Jul 2024 08:59:05 +0100 Subject: [PATCH 1/3] removed the build run --- .github/workflows/dev.yml | 6 +++--- server-script/startappdev.sh | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index f6471e47..63e0a24e 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -23,10 +23,10 @@ jobs: run: yarn install - name: Run Test - run: yarn test --passWithNoTests + run: yarn test - - name: buld the dist - run: yarn build + # - name: buld the dist + # run: yarn build - name: setup service file run: sudo cp server-script/aihomeworkdev.service /etc/systemd/system diff --git a/server-script/startappdev.sh b/server-script/startappdev.sh index 79735771..230f9e71 100755 --- a/server-script/startappdev.sh +++ b/server-script/startappdev.sh @@ -1,4 +1,4 @@ #!/bin/bash cd /var/www/aihomework/dev/ -/usr/bin/yarn prod +/usr/bin/yarn start From effb72be3d8daa9715780e5336d667c144cdf7c4 Mon Sep 17 00:00:00 2001 From: kalio007 Date: Mon, 22 Jul 2024 09:05:00 +0100 Subject: [PATCH 2/3] added a PR pipeline --- .github/workflows/dev.yml | 2 +- .github/workflows/pr.yml | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/pr.yml diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index 63e0a24e..ad9249c4 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -2,7 +2,7 @@ name: Build, Test, and Deploy for Dev Branch on: push: - branch: + branchs: - dev jobs: diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 00000000..bbac5b56 --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,27 @@ +name: CI + +on: + pull_request: + branches: + - dev + +jobs: + test: + 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: "20" + + - name: Install dependencies + run: yarn install + + - name: Run tests + run: yarn test + env: + CI: true From dacf1bb1db10de7bf58ecdccc6586d8f5098168e Mon Sep 17 00:00:00 2001 From: kalio007 Date: Mon, 22 Jul 2024 09:33:51 +0100 Subject: [PATCH 3/3] added the build command to the ci/cd --- .github/workflows/dev.yml | 4 ++-- .github/workflows/pr.yml | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index ad9249c4..3b0f4500 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -25,8 +25,8 @@ jobs: - name: Run Test run: yarn test - # - name: buld the dist - # run: yarn build + - name: buld the dist + run: yarn build - name: setup service file run: sudo cp server-script/aihomeworkdev.service /etc/systemd/system diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index bbac5b56..f5c88b87 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -25,3 +25,5 @@ jobs: run: yarn test env: CI: true + - name: buld the dist + run: yarn build