From 780c9eb7f487685d6c9c7808adc166a617e19015 Mon Sep 17 00:00:00 2001 From: Emilio Heinzmann Date: Thu, 16 May 2024 08:18:45 -0300 Subject: [PATCH 1/3] ci: fix branch name --- .github/workflows/lint-type-check-and-build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint-type-check-and-build.yaml b/.github/workflows/lint-type-check-and-build.yaml index 98b3863..0577526 100644 --- a/.github/workflows/lint-type-check-and-build.yaml +++ b/.github/workflows/lint-type-check-and-build.yaml @@ -4,7 +4,7 @@ on: pull_request: branches: - main - - develop + - dev jobs: lint-type-check-and-build: From 012dc41839bd2161fc6159433a552795c0dd91b2 Mon Sep 17 00:00:00 2001 From: Emilio Heinzmann Date: Thu, 16 May 2024 08:36:55 -0300 Subject: [PATCH 2/3] chore: improve .env.example --- .env.example | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/.env.example b/.env.example index 78f2273..44051e0 100644 --- a/.env.example +++ b/.env.example @@ -1,30 +1,18 @@ -# Since the ".env" file is gitignored, you can use the ".env.example" file to -# build a new ".env" file when you clone the repo. Keep this file up-to-date -# when you add new variables to `.env`. - -# This file will be committed to version control, so make sure not to have any -# secrets in it. If you are cloning this repo, create a copy of this file named -# ".env" and populate it with your secrets. - -# When adding additional environment variables, the schema in "/src/env.js" -# should be updated accordingly. - -# Prisma -# https://www.prisma.io/docs/reference/database-reference/connection-urls#env +# URL used by prisma to connect to the Database DATABASE_URL="postgresql://postgres:password@localhost:5432/sos-pet" # Next Auth -# You can generate a new secret on the command line with: -# openssl rand -base64 32 -# https://next-auth.js.org/configuration/options#secret -# NEXTAUTH_SECRET="" NEXTAUTH_URL="http://localhost:3000" +NEXTAUTH_SECRET="nextauthsecret" -# Next Auth Google Sign-In +# Next Auth Providers GOOGLE_CLIENT_ID="" GOOGLE_CLIENT_SECRET="" -# Postgres only used on Docker +# Google Maps +NEXT_PUBLIC_GOOGLE_MAPS_API_KEY="" + +# Docker related variables, not used on Next.js POSTGRES_DB="sos-pet" POSTGRES_USER="postgres" POSTGRES_PASSWORD="password" \ No newline at end of file From de17ca6263d37b3fecd4efe48432bbf590c33053 Mon Sep 17 00:00:00 2001 From: Emilio Heinzmann Date: Thu, 16 May 2024 08:51:48 -0300 Subject: [PATCH 3/3] feat: add build script --- scripts/vercel-ignore-build-step.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 scripts/vercel-ignore-build-step.sh diff --git a/scripts/vercel-ignore-build-step.sh b/scripts/vercel-ignore-build-step.sh new file mode 100644 index 0000000..17ba480 --- /dev/null +++ b/scripts/vercel-ignore-build-step.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +echo "VERCEL_GIT_COMMIT_REF: $VERCEL_GIT_COMMIT_REF" + +if [[ "$VERCEL_GIT_COMMIT_REF" == "main" || "$VERCEL_GIT_COMMIT_REF" == "dev" ]] ; then + echo "✅ Build can proceed" + exit 1; +else + echo "🛑 Build cancelled" + exit 0; +fi \ No newline at end of file