mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
Improvements to Automated Deployments tutorial
Prevent some frequently occurring problems * Ensure version number is between quotes * Ensure git and SSH are installed for the deployment step * Focus extra attention on the wercker.yml verification site
This commit is contained in:
parent
5bda0398e7
commit
ca55ea505a
1 changed files with 9 additions and 5 deletions
|
@ -200,14 +200,16 @@ And now we're going to add the steps themselves. First, we go to the "Registry"
|
||||||
|
|
||||||
## Using Hugo-Build
|
## Using Hugo-Build
|
||||||
|
|
||||||
Inside the details of this step you will see how to use it. At the top is a summary for the very basic usage, but when scrolling down you go through the README of the step which will usually contain more details about how to use it including a full example of using the step. So we return to our project, and while making it fit our project better we add these details to our wercker.yml file so it looks like this. Wercker also has a [page](http://devcenter.wercker.com/articles/werckeryml/validate.html) for validating wercker.yml files, and it's usually a good idea to do so before committing changes.
|
Inside the details of this step you will see how to use it. At the top is a summary for the very basic usage, but when scrolling down you go through the README of the step which will usually contain more details about the advanced options available and a full example of using the step.
|
||||||
|
|
||||||
|
We're not going to use any of the advanced features in this tutorial, so we'll return to our project and add the details we need to our wercker.yml file so that it looks like the below. Wercker also has a [page](http://devcenter.wercker.com/articles/werckeryml/validate.html) for validating wercker.yml files, and it's usually a good idea to do so before committing changes as minor typos might cause it to fail.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
box: debian
|
box: debian
|
||||||
build:
|
build:
|
||||||
steps:
|
steps:
|
||||||
- arjen/hugo-build:
|
- arjen/hugo-build:
|
||||||
version: 0.14
|
version: "0.14"
|
||||||
theme: herring-cove
|
theme: herring-cove
|
||||||
flags: --buildDrafts=true
|
flags: --buildDrafts=true
|
||||||
```
|
```
|
||||||
|
@ -227,25 +229,27 @@ Once completed a nice tick should have appeared in front of your first build, an
|
||||||
|
|
||||||
## Adding a GitHub Pages step
|
## Adding a GitHub Pages step
|
||||||
|
|
||||||
In order to deploy to GitHub Pages we need to add a deploy step. Once again searching through the Steps repository we find that the most popular step is the **lukevevier/gh-pages** step so we add the configuration for that to our wercker.yml file, which then becomes this:
|
In order to deploy to GitHub Pages we need to add a deploy step. Once again searching through the Steps repository we find that the most popular step is the **lukevevier/gh-pages** step so we add the configuration for that to our wercker.yml file. Additionally we need to ensure that the box we run on has git and ssh installed. We can do this using the **install-packages** command, which then turns the wercker.yml file into this:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
box: debian
|
box: debian
|
||||||
build:
|
build:
|
||||||
steps:
|
steps:
|
||||||
- arjen/hugo-build:
|
- arjen/hugo-build:
|
||||||
version: 0.14
|
version: "0.14"
|
||||||
theme: herring-cove
|
theme: herring-cove
|
||||||
flags: --buildDrafts=true
|
flags: --buildDrafts=true
|
||||||
deploy:
|
deploy:
|
||||||
steps:
|
steps:
|
||||||
|
- install-packages:
|
||||||
|
packages: git ssh-client
|
||||||
- lukevivier/gh-pages@0.2.1:
|
- lukevivier/gh-pages@0.2.1:
|
||||||
token: $GIT_TOKEN
|
token: $GIT_TOKEN
|
||||||
domain: hugo-wercker.ig.nore.me
|
domain: hugo-wercker.ig.nore.me
|
||||||
basedir: public
|
basedir: public
|
||||||
```
|
```
|
||||||
|
|
||||||
How does this configuration work? We've selected a couple of things, first the domain we want to use for the site. Configuring this here will ensure that GitHub Pages is aware of the domain you want to use.
|
How does the GitHub Pages configuration work? We've selected a couple of things, first the domain we want to use for the site. Configuring this here will ensure that GitHub Pages is aware of the domain you want to use.
|
||||||
|
|
||||||
Secondly we've configured the basedir to **public**, this is the directory that will be used as the website on GitHub Pages.
|
Secondly we've configured the basedir to **public**, this is the directory that will be used as the website on GitHub Pages.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue