Skip to content

Commit e6b605f

Browse files
leovafmeulivz
authored andcommitted
docs: add heroku deploy instructions (#366)
1 parent 82cd8bd commit e6b605f

File tree

1 file changed

+47
-1
lines changed

1 file changed

+47
-1
lines changed

docs/guide/deploy.md

+47-1
Original file line numberDiff line numberDiff line change
@@ -131,4 +131,50 @@ pages:
131131

132132
3. Deploy to surge, by typing `surge docs/.vuepress/dist`.
133133

134-
You can also deploy to a [custom domain](http://surge.sh/help/adding-a-custom-domain) by adding `surge docs/.vuepress/dist yourdomain.com`.
134+
You can also deploy to a [custom domain](http://surge.sh/help/adding-a-custom-domain) by adding `surge docs/.vuepress/dist yourdomain.com`.
135+
136+
## Heroku
137+
138+
1. First install [Heroku CLI](https://devcenter.heroku.com/articles/heroku-cli).
139+
140+
2. Heroku Account – [sign up here](https://signup.heroku.com).
141+
142+
3. Run heroku login in your terminal or command prompt and fill in your Heroku credentials.
143+
144+
``` bash
145+
heroku login
146+
```
147+
148+
4. Create a file called `static.json` in the root of your project with the content below. This is the configuration of your site. see more at [heroku-buildpack-static](https://github.com/heroku/heroku-buildpack-static).
149+
150+
`static.json`:
151+
```json
152+
{
153+
"root": "./docs/.vuepress/dist"
154+
}
155+
```
156+
157+
5. Set up your heroku git remote
158+
159+
``` bash
160+
# version change
161+
git init
162+
git add .
163+
git commit -m "My site ready for deployment."
164+
165+
# created app heroku (personalize name for the app)
166+
heroku apps:create my-static-site-example
167+
168+
# set buildpack for static sites
169+
heroku buildpacks:set https://github.com/heroku/heroku-buildpack-static.git
170+
```
171+
172+
6. Deploying Your Site
173+
174+
``` bash
175+
# publish site
176+
git push heroku master
177+
178+
# open site for visualize result
179+
heroku open
180+
```

0 commit comments

Comments
 (0)