# How to use my repository with hugo on github pages?

**URL:** https://discourse.gohugo.io/t/how-to-use-my-repository-with-hugo-on-github-pages/7250
**Category:** support
**Created:** [June 29, 2017, 3:16pm UTC](https://discourse.gohugo.io/t/how-to-use-my-repository-with-hugo-on-github-pages/7250 "2017-06-29T15:16:37Z")
**Posts on this page:** 16
**Page:** 1

<div class="post-metadata">

### Author: ![ecouto](https://avatars.discourse-cdn.com/v4/letter/e/e79b87/32.png) [@ecouto](https://discourse.gohugo.io/u/ecouto)
#### Post date: [June 29, 2017, 3:16pm UTC](https://discourse.gohugo.io/t/how-to-use-my-repository-with-hugo-on-github-pages/7250/1 "2017-06-29T15:16:37Z")

</div>

Hi, I have a repository with hugo project (link below) and I’d like to use github pages, there is a simple way to do this?

[https://github.com/ecouto/ecouto](https://github.com/ecouto/ecouto)

Thanks.

---

<div class="post-metadata">

### Author: ![Jonathan\_Griffin](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jonathan_griffin/32/8355_2.png) [@Jonathan\_Griffin](https://discourse.gohugo.io/u/Jonathan_Griffin)
#### Post date: [June 29, 2017, 3:25pm UTC](https://discourse.gohugo.io/t/how-to-use-my-repository-with-hugo-on-github-pages/7250/2 "2017-06-29T15:25:36Z")

</div>

Have you tried [https://gohugo.io/tutorials/github-pages-blog/](https://gohugo.io/tutorials/github-pages-blog/) ?

---

<div class="post-metadata">

### Author: ![ecouto](https://avatars.discourse-cdn.com/v4/letter/e/e79b87/32.png) [@ecouto](https://discourse.gohugo.io/u/ecouto)
#### Post date: [June 29, 2017, 3:31pm UTC](https://discourse.gohugo.io/t/how-to-use-my-repository-with-hugo-on-github-pages/7250/3 "2017-06-29T15:31:27Z")

</div>

I saw this tutorial, but I almost delete my repository =D …

is there other tutorial?

---

<div class="post-metadata">

### Author: ![Jonathan\_Griffin](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jonathan_griffin/32/8355_2.png) [@Jonathan\_Griffin](https://discourse.gohugo.io/u/Jonathan_Griffin)
#### Post date: [June 29, 2017, 3:35pm UTC](https://discourse.gohugo.io/t/how-to-use-my-repository-with-hugo-on-github-pages/7250/4 "2017-06-29T15:35:16Z")

</div>

> **[Deployment with Wercker](http://gohugo.io/hosting-and-deployment/deployment-with-wercker/)**
>
> You can use a free tool called Wercker to automate deployments between your GitHub-hosted source and final website on GitHub pages.

Try that. It uses Wercker to deploy to github pages.

Personally, I use a variation of this to deply via rsync to digital ocean.

---

<div class="post-metadata">

### Author: ![MunifTanjim](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/muniftanjim/32/17521_2.png) [@MunifTanjim](https://discourse.gohugo.io/u/MunifTanjim)
#### Post date: [June 29, 2017, 3:35pm UTC](https://discourse.gohugo.io/t/how-to-use-my-repository-with-hugo-on-github-pages/7250/5 "2017-06-29T15:35:43Z")

</div>

Just follow the [Deployment via /docs folder on master branch](https://gohugo.io/tutorials/github-pages-blog/#deployment-via-docs-folder-on-master-branch) part. It’s the easiest way. And also, it’s completely safe, i.e. no chance for your repository to go kaboom. 😂

---

<div class="post-metadata">

### Author: ![ecouto](https://avatars.discourse-cdn.com/v4/letter/e/e79b87/32.png) [@ecouto](https://discourse.gohugo.io/u/ecouto)
#### Post date: [June 29, 2017, 3:40pm UTC](https://discourse.gohugo.io/t/how-to-use-my-repository-with-hugo-on-github-pages/7250/6 "2017-06-29T15:40:03Z")

</div>

ok Guys I’ll try again … 😂

Thank you

---

<div class="post-metadata">

### Author: ![Karoline\_hc](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/karoline_hc/32/3343_2.png) [@Karoline\_hc](https://discourse.gohugo.io/u/Karoline_hc)
#### Post date: [June 29, 2017, 7:06pm UTC](https://discourse.gohugo.io/t/how-to-use-my-repository-with-hugo-on-github-pages/7250/7 "2017-06-29T19:06:01Z")

</div>

Hey Guys Have you tried installing [https://desktop.github.com/](https://desktop.github.com/) ??? 🙂

---

<div class="post-metadata">

### Author: ![ecouto](https://avatars.discourse-cdn.com/v4/letter/e/e79b87/32.png) [@ecouto](https://discourse.gohugo.io/u/ecouto)
#### Post date: [June 30, 2017, 12:28am UTC](https://discourse.gohugo.io/t/how-to-use-my-repository-with-hugo-on-github-pages/7250/8 "2017-06-30T00:28:42Z")

</div>

Only for windows and mac 😢

I’m using Linux Mint.

---

<div class="post-metadata">

### Author: ![mgmart](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/mgmart/32/2520_2.png) [@mgmart](https://discourse.gohugo.io/u/mgmart)
#### Post date: [July 1, 2017, 8:20am UTC](https://discourse.gohugo.io/t/how-to-use-my-repository-with-hugo-on-github-pages/7250/9 "2017-07-01T08:20:10Z")

</div>

> [@ecouto](#):
>
> Hi, I have a repository with hugo project (link below) and I’d like to use github pages, there is a simple way to do this?

I think the simplest way of doing the deployment is using Travis. Once you’ve Travis set up, you only need a small travis file which takes care of everything.

> **[Travis CI Documentation](https://docs.travis-ci.com/user/deployment/pages/)**
>
> GitHub Pages Deployment

I tried the Wercker approach in the past. I had to go away from this approach because it is too complicated (at least for me) to make changes to the steps involved.

A complete travis file which takes care of rendering the site, getting the latest theme version and deploy the site to GitHub Pages looks like this: [https://github.com/mgmart/SchnuddelHuddel/blob/master/.travis.yml](https://github.com/mgmart/SchnuddelHuddel/blob/master/.travis.yml).

To get started with Travis is very easy if you’re already on Github and is described here: [Redirecting…](https://docs.travis-ci.com/user/getting-started/)

---

<div class="post-metadata">

### Author: ![ecouto](https://avatars.discourse-cdn.com/v4/letter/e/e79b87/32.png) [@ecouto](https://discourse.gohugo.io/u/ecouto)
#### Post date: [July 1, 2017, 5:17pm UTC](https://discourse.gohugo.io/t/how-to-use-my-repository-with-hugo-on-github-pages/7250/10 "2017-07-01T17:17:57Z")

</div>

@mgmart I’m getting this error when I try to build on travis.

> The command “git submodule update --init --recursive” exited with 0.  
> 0.03s$ hugo -v  
> INFO 2017/07/01 17:11:11 Using config file:  
> WARN 2017/07/01 17:11:11 Unable to find Static Directory: /home/travis/build/ecouto/ecouto/static/  
> WARN 2017/07/01 17:11:11 No static directories found to sync  
> WARN 2017/07/01 17:11:11 No translation bundle found for default language “en”  
> WARN 2017/07/01 17:11:11 Translation func for language en not found, use default.  
> WARN 2017/07/01 17:11:11 i18n not initialized, check that you have language file (in i18n) that matches the site language or the default language.  
> Started building sites …  
> WARN 2017/07/01 17:11:11 Failed to read data from images/playlearn.jpg/playlearn.jpg: Data not supported for extension ‘jpg’  
> WARN 2017/07/01 17:11:11 Failed to read data from images/playlearn\_1.jpg/playlearn\_1.jpg: Data not supported for extension ‘jpg’  
> WARN 2017/07/01 17:11:11 Failed to read data from images/playlearn\_2.jpg/playlearn\_2.jpg: Data not supported for extension ‘jpg’  
> WARN 2017/07/01 17:11:11 Failed to read data from images/playlearn\_3.jpg/playlearn\_3.jpg: Data not supported for extension ‘jpg’  
> WARN 2017/07/01 17:11:11 Failed to read data from images/profile.jpg/profile.jpg: Data not supported for extension ‘jpg’  
> INFO 2017/07/01 17:11:11 found taxonomies: map[string]string{“tag”:“tags”, “category”:“categories”}  
> WARN 2017/07/01 17:11:11 [en] Unable to locate layout for “taxonomyTerm”: [taxonomy/category.terms.html.html taxonomy/category.terms.html \_default/terms.html.html \_default/terms.html indexes/indexes.html.html indexes/indexes.html theme/taxonomy/category.terms.html.html theme/taxonomy/category.terms.html theme/\_default/terms.html.html theme/\_default/terms.html theme/indexes/indexes.html.html theme/indexes/indexes.html]  
> ERROR 2017/07/01 17:11:11 Error while rendering “page”: template: work/single.html:1:3: executing “work/single.html” at \<partial “head.html” …\>: error calling partial: template: partials/head.html:9:41: executing “partials/head.html” at \<index .Site.Data.css…\>: error calling index: index of untyped nil  
> The command “hugo -v” exited with 255.  
> Done. Your build exited with 1.

---

<div class="post-metadata">

### Author: ![mgmart](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/mgmart/32/2520_2.png) [@mgmart](https://discourse.gohugo.io/u/mgmart)
#### Post date: [July 1, 2017, 6:46pm UTC](https://discourse.gohugo.io/t/how-to-use-my-repository-with-hugo-on-github-pages/7250/11 "2017-07-01T18:46:45Z")

</div>

> [@ecouto](#):
>
> The command “git submodule update --init --recursive” exited with 0.

As you do not use any theme, it is safe to remove the line  
` git submodule update --init --recursive`.

Actually it causes the fail because it tries to init a nonexistent submodule.  
If you would have cloned a theme using as a submodule, this line would get the latest version of the theme.

The same goes for ` - pygmentize -V`. Pygments is a library used by some themes for syntax highlighting. If you don’t use pygments. you are safe to delete that line and also:

` - sudo pip install pygments`  
and

````auto
python:
  - "2.7"```

But that's probably for a later step just to clean up. It should not do any harm for the moment.
````

---

<div class="post-metadata">

### Author: ![ecouto](https://avatars.discourse-cdn.com/v4/letter/e/e79b87/32.png) [@ecouto](https://discourse.gohugo.io/u/ecouto)
#### Post date: [July 2, 2017, 3:38am UTC](https://discourse.gohugo.io/t/how-to-use-my-repository-with-hugo-on-github-pages/7250/12 "2017-07-02T03:38:19Z")

</div>

@mgmart

not working yet …

I did some modify using the tutorial [Setup Hugo blog on Github Pages with Travis CI](https://haruair.github.io/post/setup-hugo-blog-on-github-pages-with-travis-ci/) , but now I get:

> The command "eval go get -t -v ./… " failed. Retrying, 2 of 3.  
> [github.com/ecouto/ecouto](http://github.com/ecouto/ecouto) (download)  
> warning: “./…” matched no packages  
> can’t load package: package [github.com/ecouto/ecouto:](http://github.com/ecouto/ecouto:) no buildable Go source files in /home/travis/gopath/src/github.com/ecouto/ecouto  
> The command "eval go get -t -v ./… " failed. Retrying, 3 of 3.  
> [github.com/ecouto/ecouto](http://github.com/ecouto/ecouto) (download)  
> warning: “./…” matched no packages  
> can’t load package: package [github.com/ecouto/ecouto:](http://github.com/ecouto/ecouto:) no buildable Go source files in /home/travis/gopath/src/github.com/ecouto/ecouto  
> The command "eval go get -t -v ./… " failed 3 times.

---

<div class="post-metadata">

### Author: ![mgmart](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/mgmart/32/2520_2.png) [@mgmart](https://discourse.gohugo.io/u/mgmart)
#### Post date: [July 2, 2017, 6:40am UTC](https://discourse.gohugo.io/t/how-to-use-my-repository-with-hugo-on-github-pages/7250/13 "2017-07-02T06:40:03Z")

</div>

The run you’ve made after removing the line  
`git submodule update --init --recursive`  
would have worked.

If you look in your log at [https://travis-ci.org/ecouto/ecouto/jobs/249241968](https://travis-ci.org/ecouto/ecouto/jobs/249241968), you see that hugo exited with an error.

````auto
The command "hugo -v" exited with 255.
Done. Your build exited with 1.```

I would suppose that you try to get the site up and running locally.
````

---

<div class="post-metadata">

### Author: ![ecouto](https://avatars.discourse-cdn.com/v4/letter/e/e79b87/32.png) [@ecouto](https://discourse.gohugo.io/u/ecouto)
#### Post date: [July 2, 2017, 4:31pm UTC](https://discourse.gohugo.io/t/how-to-use-my-repository-with-hugo-on-github-pages/7250/14 "2017-07-02T16:31:58Z")

</div>

> [@mgmart](#):
>
> he run you’ve made after removing the line

It’s working locally … I tried to run only deleting the line `git submodule update --init --recursive` but not worked.

I’ll try to do something to working well…

@mgmart thank you

---

<div class="post-metadata">

### Author: ![MunifTanjim](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/muniftanjim/32/17521_2.png) [@MunifTanjim](https://discourse.gohugo.io/u/MunifTanjim)
#### Post date: [July 2, 2017, 6:04pm UTC](https://discourse.gohugo.io/t/how-to-use-my-repository-with-hugo-on-github-pages/7250/15 "2017-07-02T18:04:40Z")

</div>

Are you using the same version of Hugo on both places?

---

<div class="post-metadata">

### Author: ![ecouto](https://avatars.discourse-cdn.com/v4/letter/e/e79b87/32.png) [@ecouto](https://discourse.gohugo.io/u/ecouto)
#### Post date: [July 2, 2017, 6:11pm UTC](https://discourse.gohugo.io/t/how-to-use-my-repository-with-hugo-on-github-pages/7250/16 "2017-07-02T18:11:37Z")

</div>

I did not get error now on travis, but how Can I access my website?

[https://ecouto.github.io/ecouto/](https://ecouto.github.io/ecouto/) not working.

@MunifTanjim locally

`Hugo Static Site Generator v0.16-DEV BuildDate: 2016-02-06T15:14:17-02:00`
