Skip to content

Commit bfc5d7b

Browse files
authored
fix(docs): add netlify init configuration steps for Netlify
Using the Netlify CLI automatically configures the build settings, so this commit documents this as the preferred configuration approach.
1 parent e7dc965 commit bfc5d7b

File tree

1 file changed

+31
-2
lines changed

1 file changed

+31
-2
lines changed

apps/docs-app/docs/features/deployment/providers.md

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,40 @@ You can also check out [Github Integration](https://docs.zerops.io/references/gi
140140

141141
Analog supports deploying on [Netlify](https://netlify.com/) with minimal configuration.
142142

143-
### Deploying the Project
143+
### Deploying the project
144144

145145
<Tabs groupId="porject-type">
146146
<TabItem label="Create analog" value="create-analog">
147-
In the build settings of your Netlify project, set the [publish directory](https://docs.netlify.com/configure-builds/overview/#definitions) to `dist/analog/public` to deploy the static assets and the [functions directory](https://docs.netlify.com/configure-builds/overview/#definitions) to `dist/analog` to deploy the server.
147+
Configuration is easiest when using [Netlify CLI](https://developers.netlify.com/cli/).
148+
149+
1. Start by running this command:
150+
151+
```bash
152+
npx netlify init
153+
```
154+
155+
If this is a new Netlify project, you'll be prompted to initialize it; build settings will be automatically configured in a `netlify.toml` file.
156+
157+
2. If you're using server-side functionality, you need to manually set the functions directory to `dist/analog` in your `netlify.toml`:
158+
159+
```toml
160+
[build]
161+
command = "npm run build"
162+
publish = "dist/analog/public"
163+
functions = "dist/analog" # ← update this
164+
```
165+
166+
3. Finally, deploy your app:
167+
168+
```bash
169+
npx netlify deploy
170+
```
171+
172+
#### Manual configuration
173+
174+
Alternatively, you can configure your project's build settings in the Netlify app.
175+
176+
Set the [publish directory](https://docs.netlify.com/configure-builds/overview/#definitions) to `dist/analog/public` to deploy the static assets and the [functions directory](https://docs.netlify.com/configure-builds/overview/#definitions) to `dist/analog` to deploy the server.
148177
</TabItem>
149178

150179
<TabItem label="Nx" value="nx">

0 commit comments

Comments
 (0)