From 43f1a10e98becdc3aaa7e5c734aa41fc3fbee7ee Mon Sep 17 00:00:00 2001 From: Jan Baykara Date: Sat, 21 Aug 2021 17:35:40 +0000 Subject: [PATCH] Fix github action's pathname for generated types --- web/spec/supabase.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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.