Skip to content

Commit 0ff1d6e

Browse files
B3nnyLulivz
authored andcommitted
docs: update deploy.md for Now 2.0 (#1142)
1 parent ede57b0 commit 0ff1d6e

File tree

1 file changed

+12
-19
lines changed

1 file changed

+12
-19
lines changed

packages/docs/docs/guide/deploy.md

+12-19
Original file line numberDiff line numberDiff line change
@@ -185,34 +185,27 @@ heroku open
185185

186186
1. Install the Now CLI globally: `npm install -g now`
187187

188-
2. Add a `docs.now.json` file to your project root:
188+
2. Add a `now.json` file to your project root:
189189

190190
```json
191191
{
192-
"name": "my-cool-docs",
193-
"type": "static",
194-
"static": {
195-
"public": "docs/.vuepress/dist"
196-
},
197-
"alias": "my-cool-docs",
198-
"files": [
199-
"docs/.vuepress/dist"
200-
]
201-
}
192+
"version": 2,
193+
"name": "vuepress",
194+
"alias": "vuepress.now.sh",
195+
"builds": [{
196+
"src": "package.json",
197+
"use": "@now/static-build"
198+
}]
199+
}
202200
```
203201

204-
You can further customize the static serving behavior by consulting [Now's documentation](https://zeit.co/docs/deployment-types/static).
202+
You can further customize the static serving behavior by consulting [Now's documentation](https://zeit.co/examples/vuepress/).
205203

206204
3. Adding a deployment script in `package.json`:
207205

208206
```json
209-
"docs:deploy": "npm run docs:build && now --local-config docs.now.json && now alias --local-config docs.now.json"
210-
```
211-
212-
If you want to deploy publicly by default, you can change the deployment script to the following one:
213-
214-
```json
215-
"docs:deploy": "npm run docs:build && now --public --local-config docs.now.json && now alias --local-config docs.now.json"
207+
"now-build": "npm run docs:build && mv docs/.vuepress/dist dist"
208+
"docs:deploy": "now && now alias"
216209
```
217210

218211
This will automatically point your site's alias to the latest deployment. Now, just run `npm run docs:deploy` to deploy your app.

0 commit comments

Comments
 (0)