From fad6d897caa524aeb85ae642f4dcaa7ed9b79690 Mon Sep 17 00:00:00 2001 From: Sean Date: Mon, 27 Jan 2025 13:23:32 -0800 Subject: [PATCH] Only trigger GitHub actions if relevant files change (#72) * Add `on.pull_request.paths` to gh actions * Format server/README.md to see if frontend action runs --- .github/workflows/auto-comment.yml | 1 + .github/workflows/backend-lint-test.yml | 1 + .github/workflows/frontend-lint.yml | 1 + server/README.md | 5 ++++- 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/auto-comment.yml b/.github/workflows/auto-comment.yml index 029fc04..56ce895 100644 --- a/.github/workflows/auto-comment.yml +++ b/.github/workflows/auto-comment.yml @@ -2,6 +2,7 @@ name: Auto Comment on PRs on: pull_request: types: [opened] + paths: server/** jobs: auto-comment: runs-on: ubuntu-latest diff --git a/.github/workflows/backend-lint-test.yml b/.github/workflows/backend-lint-test.yml index 41bd41b..73bf438 100644 --- a/.github/workflows/backend-lint-test.yml +++ b/.github/workflows/backend-lint-test.yml @@ -3,6 +3,7 @@ on: pull_request: branches: - main + paths: server/** jobs: lint-test: runs-on: ubuntu-latest diff --git a/.github/workflows/frontend-lint.yml b/.github/workflows/frontend-lint.yml index 0a1cad9..fe76bea 100644 --- a/.github/workflows/frontend-lint.yml +++ b/.github/workflows/frontend-lint.yml @@ -3,6 +3,7 @@ name: Frontend - Linting on: pull_request: branches: [main] + paths: client/** jobs: Linux: runs-on: ubuntu-latest diff --git a/server/README.md b/server/README.md index 7ac4e93..8167820 100644 --- a/server/README.md +++ b/server/README.md @@ -1,11 +1,14 @@ ## Setup + 1. Copy `.env.example` to `.env` and fill in the values 2. Add Firebase Admin credentials to a file named `firebaseServiceAccountKey.json`, at the same level as the `.env` file. 3. Start up Docker Desktop 4. Spin up Postgres: + ```bash docker-compose --env-file .env up ``` ## Directly querying Postgres on a local build using `psql` -psql -h localhost -p 5432 -U acmucsd_dev -d hackathon_portal \ No newline at end of file + +psql -h localhost -p 5432 -U acmucsd_dev -d hackathon_portal