From 5fee1229a47d91b74a00a064b7b6ee667c276705 Mon Sep 17 00:00:00 2001 From: Brandon Bayquen <93808808+bayquen@users.noreply.github.com> Date: Mon, 7 Jul 2025 13:20:21 -0700 Subject: [PATCH 1/8] GitHub Actions test Pull Request --- .github/workflows/test.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..a4be078 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,19 @@ +name: Test Project + +on: + pull_request: + branches: + - main + +jobs: + test: + runs-on: ubuntu-latest + container: + image: node:20 + steps: + - uses: actions/checkout@v3 + with: + node-version: 20 + - run: npm ci + - run: npm test + - run: npm run build \ No newline at end of file From e2b4aabe7044b56938322131bb0473b66ab1e0c1 Mon Sep 17 00:00:00 2001 From: Brandon Bayquen <93808808+bayquen@users.noreply.github.com> Date: Mon, 7 Jul 2025 13:23:54 -0700 Subject: [PATCH 2/8] Update getRecipe.ts --- src/controllers/recipes/getRecipe.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/recipes/getRecipe.ts b/src/controllers/recipes/getRecipe.ts index 2238414..f19c757 100755 --- a/src/controllers/recipes/getRecipe.ts +++ b/src/controllers/recipes/getRecipe.ts @@ -39,7 +39,7 @@ export async function getRecipe(req, res) { "Add Alfredo sauce and red pepper flakes", "Add chicken and pasta to skillet", "Stir until combined", - "Top with parsley", + "Top with parsley and sliced cucumber", "Serve and enjoy!" ], image: "https://www.budgetbytes.com/wp-content/uploads/2022/07/Chicken-Alfredo-bowl.jpg", From f49716a80fe4e8504cc59e91214b9fcf78a4a21a Mon Sep 17 00:00:00 2001 From: Brandon Bayquen <93808808+bayquen@users.noreply.github.com> Date: Mon, 7 Jul 2025 13:56:46 -0700 Subject: [PATCH 3/8] Create deploy.yml --- .github/workflows/deploy.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 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..ed70a47 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,25 @@ +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + container: + image: node:20 + steps: + - uses: actions/checkout@v3 + with: + node-version: 20 + - run: npm ci + - run: npm run + - name: Get SSH Key and set permissions + run: | + mkdir -p ~/.ssh + echo "${{ secrets.SSH_PRIVATE_KEY}}" > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa + - name: Deploy using SCP + run: scp -o StrictHostKeyChecking=no -i ~/.ssh/id_rsa ./dist/* ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:~/node-app + - name: Restart Server + run: ssh --o StrictHostKeyChecking=no -i ~/.ssh/id_rsa ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} "cd ~/node-app && npm install & pm2 restart 0" + \ No newline at end of file From 635cbff290515bc3bb8b430fdd450d7c56daa977 Mon Sep 17 00:00:00 2001 From: Brandon Bayquen <93808808+bayquen@users.noreply.github.com> Date: Mon, 7 Jul 2025 13:58:45 -0700 Subject: [PATCH 4/8] Update getRecipe.ts --- src/controllers/recipes/getRecipe.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/recipes/getRecipe.ts b/src/controllers/recipes/getRecipe.ts index f19c757..1e103f8 100755 --- a/src/controllers/recipes/getRecipe.ts +++ b/src/controllers/recipes/getRecipe.ts @@ -27,7 +27,7 @@ export async function getRecipe(req, res) { ], cookingTime: 30, instructions: [ - "Cook pasta according to package instructions", + "Cook pasta according to what Gordon Ramsay tells you", "Season chicken with salt, pepper, Italian seasoning, and paprika", "Heat 2 tbsp butter in a skillet over medium-high heat", "Add chicken and cook until golden brown", From 1ef1675fa8c0c5d13d7197d0ff1a35a4c5087c7f Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 26 Jul 2025 17:39:13 -0400 Subject: [PATCH 5/8] Github Actions That Tests the Code --- .github/workflows/test.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..2c16317 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,20 @@ +name: Test Project + +on: + Pull Request: + branches: + -main + +jobs: + test: + runs-on: ubuntu-latest + container: + image: node:20 + + steps: + - uses: actions/checkout@v3 + with: + node-version: 20 + - run: npm ci + - run: npm test + - run: npm build \ No newline at end of file From 92e620249e338c91eb72eaa79ec90e4ab2cc23c1 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 26 Jul 2025 17:44:39 -0400 Subject: [PATCH 6/8] Workflow adjusted --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2c16317..4f8b904 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,7 +1,7 @@ name: Test Project on: - Pull Request: + pull_request: branches: -main From 472af40abb0c30c15e727c148bec91ec45b0df55 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 26 Jul 2025 17:50:04 -0400 Subject: [PATCH 7/8] No Changes --- .github/workflows/test.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4f8b904..5ba5d8c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,18 +3,17 @@ name: Test Project on: pull_request: branches: - -main - + - main + jobs: test: runs-on: ubuntu-latest container: image: node:20 - steps: - uses: actions/checkout@v3 with: node-version: 20 - run: npm ci - run: npm test - - run: npm build \ No newline at end of file + - run: npm run build \ No newline at end of file From d294da689151ff419c55a3c8941856328d62f398 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 26 Jul 2025 18:01:03 -0400 Subject: [PATCH 8/8] removed the deploy yaml file --- .github/workflows/deploy.yml | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml deleted file mode 100644 index ed70a47..0000000 --- a/.github/workflows/deploy.yml +++ /dev/null @@ -1,25 +0,0 @@ -on: - push: - branches: - - main - -jobs: - deploy: - runs-on: ubuntu-latest - container: - image: node:20 - steps: - - uses: actions/checkout@v3 - with: - node-version: 20 - - run: npm ci - - run: npm run - - name: Get SSH Key and set permissions - run: | - mkdir -p ~/.ssh - echo "${{ secrets.SSH_PRIVATE_KEY}}" > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa - - name: Deploy using SCP - run: scp -o StrictHostKeyChecking=no -i ~/.ssh/id_rsa ./dist/* ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:~/node-app - - name: Restart Server - run: ssh --o StrictHostKeyChecking=no -i ~/.ssh/id_rsa ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} "cd ~/node-app && npm install & pm2 restart 0" - \ No newline at end of file