Skip to content
This repository was archived by the owner on Jul 23, 2026. It is now read-only.

Repository files navigation

Warning

This repo is archived. It won't receive new features, bug fixes, or security updates.

Published releases (up to v0.0.6) stay available and will keep working in existing workflows.


Supabase Embeddings Generator

A GitHub Action that converts your markdown files into embeddings and stores them in your Postgres/Supabase database, allowing you to perform vector similarity search inside your documentation and website.

This action is a companion to the headless-vector-search repo, which is used to store and retrieve the embeddings using OpenAI and Supabase.

Usage

In your knowledge base repository, create a new action called .github/workflows/generate_embeddings.yml with the following content:

name: 'generate_embeddings'
on: # run on main branch changes
  push:
    branches:
      - main

jobs:
  generate:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: supabase/embeddings-generator@v0.x.x # Find the latest version in the repo's releases
        with:
          supabase-url: 'https://your-project-ref.supabase.co'
          supabase-service-role-key: ${{ secrets.SUPABASE_SERVICE_ROLE_KEY }}
          openai-key: ${{ secrets.OPENAI_KEY }}
          embedding-model: 'text-embedding-3-large' # optional; defaults to text-embedding-ada-002
          docs-root-path: 'docs' # the path to the root of your md(x) files

Make sure to set SUPABASE_SERVICE_ROLE_KEY, and OPENAI_KEY as repository secrets in your repo settings (settings > secrets > actions).

You can override the OpenAI embedding model by providing the optional embedding-model input (defaults to text-embedding-ada-002 if not supplied).

See the instructions in the headless-vector-search for more information on how to query your database from your website.

Developers

See details in MAINTAINERS.md

License

MIT

About

GitHub Action to generate embeddings from the markdown files in your repository.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

126 stars

Watchers

19 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages