mirror of
https://github.com/supabase/supabase.git
synced 2026-10-08 19:05:06 +03:00
Fix github action's pathname for generated types
This commit is contained in:
1 parent
fcf45aa429
commit
43f1a10e98
1 file changed
+3
-2
@@ -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.
|
||||
|
||||
Reference in new issue
Block a user