You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default, Studio commits changes to the branch specified in your configuration (typically `main`). However, you can configure Studio to work with a staging or preview branch instead.
135
+
136
+
This is useful when you want to review changes on a preview environment before merging to production. You can currently handle pull requests manually from GitHub, but automatic PR creation is included in our roadmap and will be implemented in a future release.
137
+
138
+
::prose-steps
139
+
### Configure
140
+
141
+
Update your `nuxt.config.ts` to target your staging branch.
142
+
143
+
:::tip
144
+
You can use environment variables to manage multiple branches for different environments.
145
+
:::
146
+
147
+
```ts [nuxt.config.ts]
148
+
exportdefaultdefineNuxtConfig({
149
+
studio: {
150
+
repository: {
151
+
owner: 'your-username',
152
+
repo: 'your-repo',
153
+
branch: PROCESS.ENV.STUDIO_GITHUB_BRANCH_NAME, // Target your staging branch instead of main
154
+
}
155
+
}
156
+
})
157
+
```
158
+
159
+
### Deploy
160
+
161
+
Configure your hosting platform to deploy the staging branch to a preview URL (e.g., `staging.yourdomain.com`).
162
+
163
+
### Create a Separate GitHub OAuth App
164
+
165
+
Create a new OAuth App specifically for your staging environment:
Navigate to `https://staging.yourdomain.com/_studio` to edit content. All commits will be pushed to your configured staging branch.
184
+
185
+
### Merging to Production
186
+
187
+
Once you're satisfied with changes on your staging branch, create a pull request from your staging branch to your main branch on GitHub to deploy to production.
188
+
189
+
:::note
190
+
**Pull Request Automation Coming Soon**
191
+
192
+
:br
193
+
194
+
Automatic pull request creation from Studio is planned for a future release. For now, you'll need to manually create PRs on GitHub to merge staging changes into your main branch.
195
+
:::
196
+
::
197
+
132
198
### Accessing Studio
133
199
134
200
After deployment, access the Studio interface by navigating to your configured route (default: `/_studio`):
0 commit comments