-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: add heroku deploy instructions #366
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -131,4 +131,50 @@ pages: | |
|
||
3. Deploy to surge, by typing `surge docs/.vuepress/dist`. | ||
|
||
You can also deploy to a [custom domain](http://surge.sh/help/adding-a-custom-domain) by adding `surge docs/.vuepress/dist yourdomain.com`. | ||
You can also deploy to a [custom domain](http://surge.sh/help/adding-a-custom-domain) by adding `surge docs/.vuepress/dist yourdomain.com`. | ||
|
||
## Heroku | ||
|
||
1. First install [Heroku CLI](https://devcenter.heroku.com/articles/heroku-cli). | ||
|
||
2. Heroku Account – [sign up here](https://signup.heroku.com). | ||
|
||
3. Run heroku login in your terminal or command prompt and fill in your Heroku credentials. | ||
|
||
``` bash | ||
heroku login | ||
``` | ||
|
||
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). | ||
|
||
`static.json`: | ||
```json | ||
{ | ||
"root": "./docs/.vuepress/dist" | ||
} | ||
``` | ||
|
||
5. Set up your heroku git remote | ||
|
||
``` bash | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Keep the same indent here as above. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think he should remove the indentation from line 150 - 155 |
||
# version change | ||
git init | ||
git add . | ||
git commit -m "My site ready for deployment." | ||
|
||
# created app heroku (personalize name for the app) | ||
heroku apps:create my-static-site-example | ||
|
||
# set buildpack for static sites | ||
heroku buildpacks:set https://github.com/heroku/heroku-buildpack-static.git | ||
``` | ||
|
||
6. Deploying Your Site | ||
|
||
``` bash | ||
# publish site | ||
git push heroku master | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please move everything before this to something like Then put this line to Since only this line is needed to deploy the site, other lines just have to be done once. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thanks for the review |
||
|
||
# open site for visualize result | ||
heroku open | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These two lines looks the same, I don't know why they are diffs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
believe me I do not know either, just add a new line to start with the deploy in heroku
Any recommendation?