https://github.com/globus/example-search-portal-with-github-action-ingest
An example search portal that uses a GitHub Action to submit local data to Globus Search.
https://github.com/globus/example-search-portal-with-github-action-ingest
example portal serverless
Last synced: 5 months ago
JSON representation
An example search portal that uses a GitHub Action to submit local data to Globus Search.
- Host: GitHub
- URL: https://github.com/globus/example-search-portal-with-github-action-ingest
- Owner: globus
- Created: 2024-10-31T16:56:05.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2026-01-12T18:31:21.000Z (6 months ago)
- Last Synced: 2026-01-13T00:00:29.108Z (6 months ago)
- Topics: example, portal, serverless
- Homepage: https://globus.github.io/example-search-portal-with-github-action-ingest/
- Size: 49.8 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Example: Serverless Search Portal with GitHub Action Ingest
This repository is an example of the [@globus/template-search-portal](https://github.com/globus/template-search-portal)
You can create your own portal with similar functionality by following the [**Creating Your Own Research Search Portal**](https://github.com/globus/template-search-portal?tab=readme-ov-file#creating-your-own-static-research-search-portal) section in the template repository and then referencing the sections below.
## Background
This example combines Globus and GitHub concepts to create a search-based portal where the portal configuration and index data are managed in the same repository. For smaller datasets, this can be a simple way of introducing change and access controls to the data in your Globus Search index.
### Core Concepts
- Your search portal is hosted on GitHub Pages, referencing a Globus Search index you manage.
- By editing a file (`/data/ingest.json`) an ingest request is submitted to your Globus Search index, making new or updated data available in your portal.
**It should be noted that this example is more of a proof-of-concept.** Manually managing the data in your search index in this way won't meet the requirements for many use cases, and may present issues at larger scales, but the concepts introduced here can be used as a starting point.
## Pre-Requisites
- A [Globus Search Index](https://docs.globus.org/api/search/) you administer.
- A GitHub repository you administer, created following [**Creating Your Own Research Search Portal**](https://github.com/globus/template-search-portal?tab=readme-ov-file#creating-your-own-static-research-search-portal).
## Enabling GitHub Action-based Ingest
1. Create a new Globus Service Account using the [Developers](https://app.globus.org/settings/developers) section in the Globus Web App.
2. Update your search index to include a `writer` role for the new service account.
```bash
# Example using the Globus CLI
globus search index role create "" writer ""
# globus search index role create "0d22571f-4126-4fa0-8796-be78617c366c" writer "51ccd7c2-4740-4033-8481-8579fb99f63a@clients.auth.globus.org"
```
3. Add the following [**secrets** to your repositories GitHub Actions secrets](https://docs.github.com/en/actions/security-for-github-actions/security-guides/using-secrets-in-github-actions):
- `GLOBUS_CLIENT_ID` - The client ID of the service account.
- `GLOBUS_CLIENT_SECRET` - A client secret of the service account.
4. Add the GitHub Action workflow to your repository by copying the contents of the [`.github/workflows/ingest.yml`](.github/workflows/ingest.yml) file in this repository to your repository at `.github/workflows/ingest.yml`.
- The workflow file in this repository is annotated with comments to help you understand how it works.
5. Add a file in your repository at `/data/ingest.json` matching one of the supported [Globus Search request schemas](https://docs.globus.org/api/search/reference/ingest/#request_schemas).
- Most commonly, you will want this file to represent an `ingest_type: "GMetaList"`, allowing the repository to act as a management system for the records in your search index.