Skip to content

Commit

Permalink
fix: re-enable orama index deployment (#7)
Browse files Browse the repository at this point in the history
Now it happens on a schedule in Google Cloud Scheduler rather than
GitHub Actions.
  • Loading branch information
lucacasonato authored Feb 28, 2024
1 parent 35caf88 commit 9900a9a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 28 deletions.
27 changes: 0 additions & 27 deletions .github/workflows/orama_deploy.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/orama_reindex.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:
inputs:
environment:
description: 'Environment for deployment'
description: "Environment for deployment"
type: choice
options:
- prod
Expand Down
15 changes: 15 additions & 0 deletions terraform/scheduler.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,18 @@ resource "google_cloud_scheduler_job" "npm_tarball_rebuild_missing" {
}
}
}

resource "google_cloud_scheduler_job" "orama_deploy" {
name = "orama-deploy"
description = "Deploy the Orama index with any new changes"
schedule = "*/15 * * * *"
region = "us-central1"

http_target {
http_method = "POST"
uri = "https://api.oramasearch.com/api/v1/webhooks/${var.orama_index_id}/deploy"
headers = {
"Authorization" = "Bearer ${var.orama_private_api_key}"
}
}
}

0 comments on commit 9900a9a

Please sign in to comment.