File tree 1 file changed +12
-19
lines changed
1 file changed +12
-19
lines changed Original file line number Diff line number Diff line change @@ -185,34 +185,27 @@ heroku open
185
185
186
186
1. Install the Now CLI globally : ` npm install -g now`
187
187
188
- 2. Add a `docs. now.json` file to your project root :
188
+ 2. Add a `now.json` file to your project root :
189
189
190
190
` ` ` json
191
191
{
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
+ }
202
200
` ` `
203
201
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/ ).
205
203
206
204
3. Adding a deployment script in `package.json` :
207
205
208
206
` ` ` 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"
216
209
` ` `
217
210
218
211
This will automatically point your site's alias to the latest deployment. Now, just run `npm run docs:deploy` to deploy your app.
You can’t perform that action at this time.
0 commit comments