Skip to content

Commit d83ef08

Browse files
authored
docs: revive section on preparing github repository (supabase#37627)
* docs: revive section on preparing github repository * chore: remove unnecessary steps
1 parent 310d2d5 commit d83ef08

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

apps/docs/content/guides/deployment/branching/github-integration.mdx

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,60 @@ In the Supabase Dashboard:
1717
6. Configure the other options as needed to automate your GitHub connection.
1818
7. Click **Enable integration**.
1919

20+
## Preparing your Git repository
21+
22+
You will be using the [Supabase CLI](/docs/guides/cli) to initialise your local `./supabase` directory:
23+
24+
<StepHikeCompact>
25+
<StepHikeCompact.Step step={1}>
26+
<StepHikeCompact.Details title="Initialize Supabase locally" fullWidth>
27+
28+
If you don't have a `./supabase` directory, you can create one:
29+
30+
```markdown
31+
supabase init
32+
```
33+
34+
</StepHikeCompact.Details>
35+
</StepHikeCompact.Step>
36+
37+
<StepHikeCompact.Step step={2}>
38+
<StepHikeCompact.Details title="Pull your database migration" fullWidth>
39+
40+
Pull your database changes using `supabase db pull`. To get your database connection string, go to your project dashboard, click [Connect](https://supabase.com/dashboard/project/_?showConnect=true) and look for the Session pooler connection string.
41+
42+
```markdown
43+
supabase db pull --db-url <db_connection_string>
44+
45+
# Your Database connection string will look like this:
46+
# postgres://postgres.xxxx:[email protected]:5432/postgres
47+
```
48+
<Admonition type="note">
49+
50+
If you're in an [IPv6 environment](https://github.com/orgs/supabase/discussions/27034) or have the IPv4 Add-On, you can use the direct connection string instead of Supavisor in Session mode.
51+
52+
</Admonition>
53+
54+
</StepHikeCompact.Details>
55+
</StepHikeCompact.Step>
56+
57+
<StepHikeCompact.Step step={3}>
58+
<StepHikeCompact.Details title="Commit the `supabase` directory to Git" fullWidth>
59+
60+
Commit the `supabase` directory to Git, and push your changes to your remote repository.
61+
62+
```bash
63+
git add supabase
64+
git commit -m "Initial migration"
65+
git push
66+
```
67+
68+
69+
</StepHikeCompact.Details>
70+
</StepHikeCompact.Step>
71+
72+
</StepHikeCompact>
73+
2074
## Syncing GitHub branches
2175

2276
Enable the **Automatic branching** option in your GitHub Integration configuration to automatically sync GitHub branches with Supabase branches.

0 commit comments

Comments
 (0)