Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Fix github action's pathname for generated types

Jan Baykara43f1a10e98be
diff --git a/web/spec/supabase.yml b/web/spec/supabase.yml
index 7566a184662..c6ec0e70be1 100644
--- a/web/spec/supabase.yml
+++ b/web/spec/supabase.yml
@@ -238,14 +238,15 @@ pages:
};
```
- ### Update types automatically with GitHub Actions
+ ### Update types automatically with GitHub
+ s
One way to keep your type definitions in sync with your database is to set up a GitHub action that runs on a schedule.
Add a script to your package.json to generate the types:
```
- "update-types": "npx openapi-typescript https://your-project.supabase.co/rest/v1/?apikey=your-anon-key --output types/supabase.ts"
+ "update-types": "npx openapi-typescript https://your-project.supabase.co/rest/v1/?apikey=your-anon-key --output types/database/index.ts"
```
In your repo, create the file `.github/workflows/update-types.yml`. Add the following snippet into this file to define the action. If there is a change to your definitions, this script will commit the change to your repo.