);
From a3d9079c70062074323f00bfbf87f73923eb8e5c Mon Sep 17 00:00:00 2001
From: Marciel Torres
Date: Fri, 17 May 2024 17:01:34 -0300
Subject: [PATCH 03/20] Adding github project link
---
README.md | 2 +-
src/app/about/page.tsx | 2 ++
src/components/footer/index.tsx | 10 +++++++++-
3 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index 82d961e..d5e12aa 100644
--- a/README.md
+++ b/README.md
@@ -12,6 +12,6 @@ Com o SOS Pet, as pessoas que resgatam animais de enchentes podem rapidamente en
1. Instale as dependências
1. Crie um arquivo `.env` baseando se no `.env.example`
1. Assegure se de preencher todas as variáveis ambiente.
-1. Suba o baco de dados: `docker compose up -d`
+1. Suba o baco de dados: `docker-compose up -d`
1. Rode as migrations: `npx prisma migrate dev`
1. Rode o projeto com o script `dev` disponível no `package.json`
diff --git a/src/app/about/page.tsx b/src/app/about/page.tsx
index 0e50f5b..f4cd73d 100644
--- a/src/app/about/page.tsx
+++ b/src/app/about/page.tsx
@@ -61,6 +61,8 @@ export default function About() {
transformar um momento de crise em uma oportunidade para fazer a
diferença na vida de um animal. Juntos, podemos salvar vidas e
construir um futuro mais seguro para nossos amigos de quatro patas.
+ Além disso, esse projeto tem seu código fonte aberto e disponível para colaboração:
+ https://github.com/emiliosheinz/sos-pet
diff --git a/src/components/footer/index.tsx b/src/components/footer/index.tsx
index 9db2522..0b5862a 100644
--- a/src/components/footer/index.tsx
+++ b/src/components/footer/index.tsx
@@ -1,6 +1,6 @@
import Image from "next/image";
import Link from "next/link";
-import { FaInstagram } from "react-icons/fa";
+import { FaInstagram, FaGithub } from "react-icons/fa";
export function Footer() {
return (
@@ -15,6 +15,13 @@ export function Footer() {
/>
+
+ sos-pet
+
Políticas de privacidade
+
From 38177e4a5f3408cffdcee5373709f42626424278 Mon Sep 17 00:00:00 2001
From: Emilio Heinzmann
Date: Sat, 18 May 2024 10:26:28 -0300
Subject: [PATCH 04/20] ci: trigger lint type-check and build workflow on pull
request target
---
.github/workflows/lint-type-check-and-build.yaml | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/lint-type-check-and-build.yaml b/.github/workflows/lint-type-check-and-build.yaml
index 0577526..d8d78df 100644
--- a/.github/workflows/lint-type-check-and-build.yaml
+++ b/.github/workflows/lint-type-check-and-build.yaml
@@ -1,7 +1,7 @@
name: 🚀 Lint, Type Check, and Build
on:
- pull_request:
+ pull_request_target:
branches:
- main
- dev
@@ -9,9 +9,12 @@ on:
jobs:
lint-type-check-and-build:
runs-on: ubuntu-latest
+ name: Lint, Type Check, and Build
steps:
- name: Checkout code
uses: actions/checkout@v4
+ with:
+ ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Node.js
uses: actions/setup-node@v4
From 1c3513b4a48fd551e606828d8361541ed2620ccd Mon Sep 17 00:00:00 2001
From: Emilio Heinzmann
Date: Sat, 18 May 2024 10:30:46 -0300
Subject: [PATCH 05/20] ci: usa .env.example to define environment variables
---
.env.example | 8 ++++----
.github/workflows/lint-type-check-and-build.yaml | 6 ++----
2 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/.env.example b/.env.example
index 44051e0..4e08b10 100644
--- a/.env.example
+++ b/.env.example
@@ -3,14 +3,14 @@ DATABASE_URL="postgresql://postgres:password@localhost:5432/sos-pet"
# Next Auth
NEXTAUTH_URL="http://localhost:3000"
-NEXTAUTH_SECRET="nextauthsecret"
+NEXTAUTH_SECRET="nextauth-secret"
# Next Auth Providers
-GOOGLE_CLIENT_ID=""
-GOOGLE_CLIENT_SECRET=""
+GOOGLE_CLIENT_ID="google-client-id"
+GOOGLE_CLIENT_SECRET="google-client-secret"
# Google Maps
-NEXT_PUBLIC_GOOGLE_MAPS_API_KEY=""
+NEXT_PUBLIC_GOOGLE_MAPS_API_KEY="google-maps-api-key"
# Docker related variables, not used on Next.js
POSTGRES_DB="sos-pet"
diff --git a/.github/workflows/lint-type-check-and-build.yaml b/.github/workflows/lint-type-check-and-build.yaml
index d8d78df..1fd6680 100644
--- a/.github/workflows/lint-type-check-and-build.yaml
+++ b/.github/workflows/lint-type-check-and-build.yaml
@@ -1,7 +1,7 @@
name: 🚀 Lint, Type Check, and Build
on:
- pull_request_target:
+ pull_request:
branches:
- main
- dev
@@ -13,8 +13,6 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
- with:
- ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Node.js
uses: actions/setup-node@v4
@@ -23,7 +21,7 @@ jobs:
cache: "yarn"
- name: Setup .env file
- run: echo "${{ secrets.DOT_ENV_FILE_CONTENT }}" > .env
+ run: cat .env.example > .env
- name: Install dependencies
run: yarn
From 8f7516f411430d0d10c5cc88ba7ae93cd8e2f542 Mon Sep 17 00:00:00 2001
From: Emilio Heinzmann
Date: Sat, 18 May 2024 10:32:10 -0300
Subject: [PATCH 06/20] docs: add comment about usage of .env.example
---
.github/workflows/lint-type-check-and-build.yaml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/.github/workflows/lint-type-check-and-build.yaml b/.github/workflows/lint-type-check-and-build.yaml
index 1fd6680..c6b57b1 100644
--- a/.github/workflows/lint-type-check-and-build.yaml
+++ b/.github/workflows/lint-type-check-and-build.yaml
@@ -21,6 +21,9 @@ jobs:
cache: "yarn"
- name: Setup .env file
+ # All the environment variables in .env.example are invalid,
+ # therefore the application will not be functional. But, it is enough
+ # for linting, type checking, and building.
run: cat .env.example > .env
- name: Install dependencies
From 0a88535987bc19618c152fcbdf1b5bb3210578f4 Mon Sep 17 00:00:00 2001
From: Marciel Torres
Date: Sat, 18 May 2024 14:25:47 -0300
Subject: [PATCH 07/20] Ajuste no texto
---
src/app/about/page.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/about/page.tsx b/src/app/about/page.tsx
index f4cd73d..c07cd8f 100644
--- a/src/app/about/page.tsx
+++ b/src/app/about/page.tsx
@@ -61,7 +61,7 @@ export default function About() {
transformar um momento de crise em uma oportunidade para fazer a
diferença na vida de um animal. Juntos, podemos salvar vidas e
construir um futuro mais seguro para nossos amigos de quatro patas.
- Além disso, esse projeto tem seu código fonte aberto e disponível para colaboração:
+ Além disso, esse projeto tem o código fonte aberto e disponível para colaboração:
https://github.com/emiliosheinz/sos-pet