Skip to content
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

Merged
merged 3 commits into from
May 10, 2018
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 47 additions & 1 deletion docs/guide/deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Copy link
Member

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?

Copy link
Contributor Author

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?


## 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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep the same indent here as above.

Copy link
Contributor

Choose a reason for hiding this comment

The 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
Copy link
Contributor

@ycmjason ycmjason May 8, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move everything before this to something like 5. Set up your heroku git remote

Then put this line to 6. Deploying Your Site

Since only this line is needed to deploy the site, other lines just have to be done once.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the review


# open site for visualize result
heroku open
```