From 8b5b6063a60d6ffcd813f838302e11a9b293916e Mon Sep 17 00:00:00 2001 From: CodingForEntrepreneurs Date: Fri, 26 Jan 2024 17:11:17 -0700 Subject: [PATCH 1/2] Updated for full dev deployment stage --- .github/workflows/dev-stage.yaml | 8 ++++++-- package.json | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dev-stage.yaml b/.github/workflows/dev-stage.yaml index 356a3fc..c5f9b08 100644 --- a/.github/workflows/dev-stage.yaml +++ b/.github/workflows/dev-stage.yaml @@ -36,9 +36,13 @@ jobs: run: | export DB_URL=$(neonctl connection-string --branch dev --api-key ${{ env.API_KEY }}) npx tsx src/cli/putSecrets.js dev $DB_URL - - name: Branch Info + - name: Deploy dev stage + run: | + npm run deploy-dev-stage + - name: Dev Stage Pull Request run: | export PR_BRANCH=$(git branch --show-current) export DEFAULT_BRANCH=$(git remote show origin | awk '/HEAD branch/ {print $NF}') echo "$PR_BRANCH and $DEFAULT_BRANCH" - gh pr create --title "Automated PR from Dev Stage" --body "Coming Soon" --base $DEFAULT_BRANCH --head $PR_BRANCH --repo $GITHUB_REPOSITORY \ No newline at end of file + export DEV_STAGE_INFO=$(npm run info-dev-stage) + gh pr create --title "Automated PR from Dev Stage" --body "$DEV_STAGE_INFO" --base $DEFAULT_BRANCH --head $PR_BRANCH --repo $GITHUB_REPOSITORY \ No newline at end of file diff --git a/package.json b/package.json index 10da4de..73fd69b 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,8 @@ "dev": "serverless offline --stage dev", "info": "serverless info --stage prod --region us-east-2", "deploy": "serverless deploy --stage prod --region us-east-2", + "deploy-dev-stage": "serverless deploy --stage dev --region us-east-2", + "info-dev-stage": "serverless info --stage prod --region us-east-2", "remove": "serverless remove --stage prod --region us-east-2", "generate": "drizzle-kit generate:pg --config=drizzle.config.js", "migrate": "tsx src/cli/migrator.js" From fb7274aedac2ac57d33e150d60ee64298cc3c506 Mon Sep 17 00:00:00 2001 From: CodingForEntrepreneurs Date: Fri, 26 Jan 2024 17:39:54 -0700 Subject: [PATCH 2/2] Updated to listLeads --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 15204d8..d337182 100644 --- a/src/index.js +++ b/src/index.js @@ -27,7 +27,7 @@ app.get("/path", (req, res, next) => { app.get("/leads", async (req, res, next) => { - const results = await crud.getLeads() + const results = await crud.listLeads() return res.status(200).json({ results: results, });