Skip to content

Commit

Permalink
Merge pull request #1 from limdingwen/develop
Browse files Browse the repository at this point in the history
Update to v1
  • Loading branch information
limdingwen authored Aug 1, 2024
2 parents f1c14b0 + 56aec83 commit 2cca784
Show file tree
Hide file tree
Showing 60 changed files with 1,685 additions and 1,302 deletions.
3 changes: 2 additions & 1 deletion scripts/.env.example
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
SUPABASE_PROJECT_ID="TODO"
SUPABASE_FUNCTIONS_KEY="TODO"
SUPABASE_SERVICE_ROLE_KEY="TODO"
SUPABASE_ANON_KEY="TODO"
2 changes: 1 addition & 1 deletion scripts/deploy-and-run/fetch-mp-data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ source ../lib/functions/run.sh
FUNCTION_NAME="fetch-mp-data"

deploy "$SUPABASE_PROJECT_ID" "$FUNCTION_NAME"
run "$SUPABASE_PROJECT_ID" "$SUPABASE_FUNCTIONS_KEY" "$FUNCTION_NAME" "{}"
run "$SUPABASE_PROJECT_ID" "$SUPABASE_SERVICE_ROLE_KEY" "$FUNCTION_NAME" "{}"
11 changes: 11 additions & 0 deletions scripts/deploy-and-run/fill-debate-bill-ids.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
set -e

source ../.env
source ../lib/functions/deploy.sh
source ../lib/functions/run.sh

FUNCTION_NAME="fill-debate-bill-ids"

deploy "$SUPABASE_PROJECT_ID" "$FUNCTION_NAME"
run "$SUPABASE_PROJECT_ID" "$SUPABASE_SERVICE_ROLE_KEY" "$FUNCTION_NAME" "{}"
11 changes: 11 additions & 0 deletions scripts/deploy-and-run/fill-debate-speaker-ids.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
set -e

source ../.env
source ../lib/functions/deploy.sh
source ../lib/functions/run.sh

FUNCTION_NAME="fill-debate-speaker-ids"

deploy "$SUPABASE_PROJECT_ID" "$FUNCTION_NAME"
run "$SUPABASE_PROJECT_ID" "$SUPABASE_SERVICE_ROLE_KEY" "$FUNCTION_NAME" "{}"
2 changes: 1 addition & 1 deletion scripts/deploy-and-run/generate-bills-summary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ source ../lib/functions/run.sh
FUNCTION_NAME="generate-bills-summary"

deploy "$SUPABASE_PROJECT_ID" "$FUNCTION_NAME"
run "$SUPABASE_PROJECT_ID" "$SUPABASE_FUNCTIONS_KEY" "$FUNCTION_NAME" "{}"
run "$SUPABASE_PROJECT_ID" "$SUPABASE_SERVICE_ROLE_KEY" "$FUNCTION_NAME" "{}"
11 changes: 11 additions & 0 deletions scripts/deploy-and-run/generate-debate-summary.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
set -e

source ../.env
source ../lib/functions/deploy.sh
source ../lib/functions/run.sh

FUNCTION_NAME="generate-debate-summary"

deploy "$SUPABASE_PROJECT_ID" "$FUNCTION_NAME"
run "$SUPABASE_PROJECT_ID" "$SUPABASE_SERVICE_ROLE_KEY" "$FUNCTION_NAME" "{}"
2 changes: 1 addition & 1 deletion scripts/deploy-and-run/per-1-hour.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ source ../lib/functions/run.sh
FUNCTION_NAME="per-1-hour"

deploy "$SUPABASE_PROJECT_ID" "$FUNCTION_NAME"
run "$SUPABASE_PROJECT_ID" "$SUPABASE_FUNCTIONS_KEY" "$FUNCTION_NAME" "{}"
run "$SUPABASE_PROJECT_ID" "$SUPABASE_SERVICE_ROLE_KEY" "$FUNCTION_NAME" "{}"
2 changes: 1 addition & 1 deletion scripts/deploy-and-run/per-10-min.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ source ../lib/functions/run.sh
FUNCTION_NAME="per-10-min"

deploy "$SUPABASE_PROJECT_ID" "$FUNCTION_NAME"
run "$SUPABASE_PROJECT_ID" "$SUPABASE_FUNCTIONS_KEY" "$FUNCTION_NAME" "{}"
run "$SUPABASE_PROJECT_ID" "$SUPABASE_SERVICE_ROLE_KEY" "$FUNCTION_NAME" "{}"
2 changes: 1 addition & 1 deletion scripts/deploy-and-run/scrape-bills-introduced.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ source ../lib/functions/run.sh
FUNCTION_NAME="scrape-bills-introduced"

deploy "$SUPABASE_PROJECT_ID" "$FUNCTION_NAME"
run "$SUPABASE_PROJECT_ID" "$SUPABASE_FUNCTIONS_KEY" "$FUNCTION_NAME" "{}"
run "$SUPABASE_PROJECT_ID" "$SUPABASE_SERVICE_ROLE_KEY" "$FUNCTION_NAME" "{}"
2 changes: 1 addition & 1 deletion scripts/deploy-and-run/scrape-bills-pdf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ source ../lib/functions/run.sh
FUNCTION_NAME="scrape-bills-pdf"

deploy "$SUPABASE_PROJECT_ID" "$FUNCTION_NAME"
run "$SUPABASE_PROJECT_ID" "$SUPABASE_FUNCTIONS_KEY" "$FUNCTION_NAME" "{}"
run "$SUPABASE_PROJECT_ID" "$SUPABASE_SERVICE_ROLE_KEY" "$FUNCTION_NAME" "{}"
11 changes: 11 additions & 0 deletions scripts/deploy-and-run/scrape-sitting-dates.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
set -e

source ../.env
source ../lib/functions/deploy.sh
source ../lib/functions/run.sh

FUNCTION_NAME="scrape-sitting-dates"

deploy "$SUPABASE_PROJECT_ID" "$FUNCTION_NAME"
run "$SUPABASE_PROJECT_ID" "$SUPABASE_SERVICE_ROLE_KEY" "$FUNCTION_NAME" "{}"
2 changes: 1 addition & 1 deletion scripts/deploy-and-run/scrape-sitting-report.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ source ../lib/functions/run.sh
FUNCTION_NAME="scrape-sitting-report"

deploy "$SUPABASE_PROJECT_ID" "$FUNCTION_NAME"
run "$SUPABASE_PROJECT_ID" "$SUPABASE_FUNCTIONS_KEY" "$FUNCTION_NAME" "{}"
run "$SUPABASE_PROJECT_ID" "$SUPABASE_SERVICE_ROLE_KEY" "$FUNCTION_NAME" "{}"
11 changes: 11 additions & 0 deletions scripts/deploy-and-run/search.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
set -e

source ../.env
source ../lib/functions/deploy.sh
source ../lib/functions/run.sh

FUNCTION_NAME="search"

deploy "$SUPABASE_PROJECT_ID" "$FUNCTION_NAME"
run "$SUPABASE_PROJECT_ID" "$SUPABASE_ANON_KEY" "$FUNCTION_NAME" '{"query": "30 by 30"}'
5 changes: 3 additions & 2 deletions site/.env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
NEXT_PUBLIC_SUPABASE_URL="TODO"
NEXT_PUBLIC_SUPABASE_ANON_KEY="TODO"
SITE_NAME="Parliament Summary"
ITEMS_PER_PAGE="20"
NEXT_PUBLIC_SITE_NAME="Parliament Summary"
NEXT_PUBLIC_ITEMS_PER_PAGE="20"
NEXT_PUBLIC_REPOSITORY_URL="https://github.com/limdingwen/parliament-summary"
Loading

0 comments on commit 2cca784

Please sign in to comment.