Skip to content

Commit

Permalink
Merge pull request #15 from codingforentrepreneurs/dev
Browse files Browse the repository at this point in the history
Automated PR from Dev Stage
  • Loading branch information
codingforentrepreneurs authored Jan 27, 2024
2 parents a9bc4f2 + 8509047 commit dc647b8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/dev-stage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
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
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 2 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const app = express();
const STAGE = process.env.STAGE || 'prod'
app.use(express.json())


app.get("/", async (req, res, next) => {
console.log(process.env.DEBUG )
const sql = await getDbClient()
Expand All @@ -27,7 +28,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,
});
Expand Down

0 comments on commit dc647b8

Please sign in to comment.