# Fail to deploy from Documenter to GITHUB

**URL:** <https://discourse.julialang.org/t/fail-to-deploy-from-documenter-to-github/98021>\
**Category:** Performance\
**Tags:** github, documenterjl\
**Created:** [April 28, 2023, 5:14am UTC](https://discourse.julialang.org/t/fail-to-deploy-from-documenter-to-github/98021 "2023-04-28T05:14:40Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Philippe\_Maincon1](https://avatars.discourse-cdn.com/v4/letter/p/ec9cab/32.png) [@Philippe\_Maincon1](https://discourse.julialang.org/u/Philippe_Maincon1)\
**Post date:** [April 28, 2023, 5:14am UTC](https://discourse.julialang.org/t/fail-to-deploy-from-documenter-to-github/98021/1 "2023-04-28T05:14:40Z")

</div>

I am working on [Muscade.jl](https://github.com/SINTEF/Muscade.jl) (work in progress!), and I have a first incomplete documentation I wish to deploy. Everything works fine… except I get a `404`. Here is the dump:

My repo structure includes

```julia
Muscade
   docs
        make.jl
        Project.toml
        src
            index.md
            ...
        build
            index.html
            ...
    README.md
    src

```

My `make.jl` is

```julia
using Documenter, Muscade

repo = normpath((@ __DIR__ )*"/..")
push!(LOAD_PATH,joinpath(repo,"src"))
cp(joinpath(repo,"LICENSE.md"),joinpath(repo,"docs/src/LICENSE.md"),
   force=true)

makedocs(sitename ="Muscade.jl",
        format = Documenter.HTML(prettyurls = false,
                                    sidebar_sitename = false),
        pages = ["index.md",
                       ...],
                     source = "src",
                     build = "build"   
        )

deploydocs(repo = "github.com/SINTEF/Muscade.jl.git",target="build",devbranch="philippe")

```

`Muscade/.github/workflows/documentation.yml` contains

```julia
name: Documentation
on:
  push:
    branches:
      - main
    tags: '*'
  pull_request:

jobs:
  build:
    permissions:
      contents: write
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: julia-actions/setup-julia@v1
        with:
          version: '1.8'
      - name: Install dependencies
        run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
      - name: Build and deploy
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # If authenticating with GitHub Actions token
        # DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # If authenticating with SSH deploy key
        run: julia --project=docs/ docs/make.jl

```

In GITHUB | settings | pages, I have specified:  
“deploy from a branch”, “main” “/root” and clicked save.

Building the doc locally works, I can navigate my doc.

I tag and commit a release, create an issue with “@juliaregistrator register”. The release goes well.  
I point my browser to

```julia
https://sintef.github.io/muscade.jl/dev    
https://sintef.github.io/muscade.jl/stable 
https://sintef.github.io/Muscade.jl/       

```

In the two first cases I get `404`, in the later, I get to read my `README.md` file.

It’s difficult to move on without any feedback on what the problem is. Any suggestions?

---

<div class="post-metadata">

**Author:** ![cormullion](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cormullion/32/49131_2.png) [@cormullion](https://discourse.julialang.org/u/cormullion)\
**Post date:** [April 28, 2023, 6:57am UTC](https://discourse.julialang.org/t/fail-to-deploy-from-documenter-to-github/98021/2 "2023-04-28T06:57:09Z")

</div>

> [@Philippe\_Maincon1](#):
>
> “deploy from a branch”, “main” “/root” and clicked save

Try ‘gh-pages’ ?

---

<div class="post-metadata">

**Author:** ![Philippe\_Maincon1](https://avatars.discourse-cdn.com/v4/letter/p/ec9cab/32.png) [@Philippe\_Maincon1](https://discourse.julialang.org/u/Philippe_Maincon1)\
**Post date:** [April 28, 2023, 7:29am UTC](https://discourse.julialang.org/t/fail-to-deploy-from-documenter-to-github/98021/3 "2023-04-28T07:29:03Z")

</div>

Oh thanks, I had missed that! 😀 So now I have set “deploy from a branch”, “gh-pages”.

That _alone_ does not make the doc appear. **What triggers the doc-deploying bot**?

1. A commit & push on my `philippe` dev-branch does not seem to do so.
2. Does it have to be a `create new issue | @juliaregistrator register`-release,
3. or a `GITHUB | releases | Draft a new release`?

---

<div class="post-metadata">

**Author:** ![cormullion](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cormullion/32/49131_2.png) [@cormullion](https://discourse.julialang.org/u/cormullion)\
**Post date:** [April 28, 2023, 7:33am UTC](https://discourse.julialang.org/t/fail-to-deploy-from-documenter-to-github/98021/4 "2023-04-28T07:33:32Z")

</div>

One thing to mention - I’ve noticed delays of up to 30 minutes before the documentation finally appears, although on other occasions it works almost instantly. Makes trouble-shooting frustrating… 😀

---

<div class="post-metadata">

**Author:** ![Philippe\_Maincon1](https://avatars.discourse-cdn.com/v4/letter/p/ec9cab/32.png) [@Philippe\_Maincon1](https://discourse.julialang.org/u/Philippe_Maincon1)\
**Post date:** [April 28, 2023, 7:50am UTC](https://discourse.julialang.org/t/fail-to-deploy-from-documenter-to-github/98021/5 "2023-04-28T07:50:38Z")

</div>

That’s a very important point! “will be compiled by the server in the next round…”

My question on “what triggers the doc-deploying bot?” still stands. Anyone?

---

<div class="post-metadata">

**Author:** ![cormullion](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cormullion/32/49131_2.png) [@cormullion](https://discourse.julialang.org/u/cormullion)\
**Post date:** [April 28, 2023, 7:57am UTC](https://discourse.julialang.org/t/fail-to-deploy-from-documenter-to-github/98021/6 "2023-04-28T07:57:06Z")

</div>

Probably a commit and push to a github action.

Docs look OK 😂

 ![Purpose · Muscade.jl](https://global.discourse-cdn.com/julialang/original/3X/4/7/473b000b069427c1e95b0c5aeeafb7721f0c7c59.png)

---

<div class="post-metadata">

**Author:** ![Philippe\_Maincon1](https://avatars.discourse-cdn.com/v4/letter/p/ec9cab/32.png) [@Philippe\_Maincon1](https://discourse.julialang.org/u/Philippe_Maincon1)\
**Post date:** [April 28, 2023, 7:59am UTC](https://discourse.julialang.org/t/fail-to-deploy-from-documenter-to-github/98021/7 "2023-04-28T07:59:30Z")

</div>

VICTORY !!! 😀 ☀

Hey wait, I was too fast: on what URL did you obtain this vision of beauty? I still get `404` on all the above-mentionned URLs… _Some_ get to see my docs 😛

---

<div class="post-metadata">

**Author:** ![cormullion](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cormullion/32/49131_2.png) [@cormullion](https://discourse.julialang.org/u/cormullion)\
**Post date:** [April 28, 2023, 8:04am UTC](https://discourse.julialang.org/t/fail-to-deploy-from-documenter-to-github/98021/8 "2023-04-28T08:04:03Z")

</div>

Cool! By the way, are you running an old version of Documenter?

Yes, since there’s no badge I went for [Reference manual · Muscade.jl](https://sintef.github.io/Muscade.jl/v0.3.2/reference.html) …

---

<div class="post-metadata">

**Author:** ![Philippe\_Maincon1](https://avatars.discourse-cdn.com/v4/letter/p/ec9cab/32.png) [@Philippe\_Maincon1](https://discourse.julialang.org/u/Philippe_Maincon1)\
**Post date:** [April 28, 2023, 8:14am UTC](https://discourse.julialang.org/t/fail-to-deploy-from-documenter-to-github/98021/9 "2023-04-28T08:14:39Z")

</div>

How did you ever obtain that URL !?! 😄  
[https://sintef.github.io/Muscade.jl/v0.3.2/index.html](https://sintef.github.io/Muscade.jl/v0.3.2/index.html)`

I have (yesterday) created a series of commits in the hope of deploying - I am now at 0.3.5. So we are looking at an “old” doc (though the text hasn’t changed).

I was using `[e30172f5] Documenter v0.27.24`, and am now updating it.

---

<div class="post-metadata">

**Author:** ![cormullion](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cormullion/32/49131_2.png) [@cormullion](https://discourse.julialang.org/u/cormullion)\
**Post date:** [April 28, 2023, 8:18am UTC](https://discourse.julialang.org/t/fail-to-deploy-from-documenter-to-github/98021/10 "2023-04-28T08:18:52Z")

</div>

Your built documents go here:

> **[GitHub - SINTEF/Muscade.jl at gh-pages](https://github.com/SINTEF/Muscade.jl/tree/gh-pages)**
>
> gh-pages

so just link to the github-pages bit and point to the folder you want.

There are three difficult parts to developing Julia packages: learning Git(hub), setting up Documenter, and - well, that’s it, really… 😂

---

<div class="post-metadata">

**Author:** ![Philippe\_Maincon1](https://avatars.discourse-cdn.com/v4/letter/p/ec9cab/32.png) [@Philippe\_Maincon1](https://discourse.julialang.org/u/Philippe_Maincon1)\
**Post date:** [April 28, 2023, 8:25am UTC](https://discourse.julialang.org/t/fail-to-deploy-from-documenter-to-github/98021/11 "2023-04-28T08:25:38Z")

</div>

Ahh, now I will be able to _see_ what is available.  
Thank you for taking the time!

---

<div class="post-metadata">

**Author:** ![lmiq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lmiq/32/18314_2.png) [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Post date:** [April 28, 2023, 9:40am UTC](https://discourse.julialang.org/t/fail-to-deploy-from-documenter-to-github/98021/12 "2023-04-28T09:40:33Z")

</div>

> [@Philippe\_Maincon1](#):
>
> My question on “what triggers the doc-deploying bot?” still stands. Anyone?

A new GitHub release, afaik

---

<div class="post-metadata">

**Author:** ![Philippe\_Maincon1](https://avatars.discourse-cdn.com/v4/letter/p/ec9cab/32.png) [@Philippe\_Maincon1](https://discourse.julialang.org/u/Philippe_Maincon1)\
**Post date:** [April 28, 2023, 9:47am UTC](https://discourse.julialang.org/t/fail-to-deploy-from-documenter-to-github/98021/13 "2023-04-28T09:47:57Z")

</div>

I will test that a little later. But I feel that with your help and Cormullion, I am going to get grip on this. Thank you!

---

<div class="post-metadata">

**Author:** ![lmiq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lmiq/32/18314_2.png) [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Post date:** [April 28, 2023, 10:00am UTC](https://discourse.julialang.org/t/fail-to-deploy-from-documenter-to-github/98021/14 "2023-04-28T10:00:24Z")

</div>

This is what I do, specifically: [Publish Docs · JuliaNotes.jl](https://m3g.github.io/JuliaNotes.jl/stable/publish_docs/#Deployment-of-the-docs-of-a-previous-version)

---

<div class="post-metadata">

**Author:** ![Philippe\_Maincon1](https://avatars.discourse-cdn.com/v4/letter/p/ec9cab/32.png) [@Philippe\_Maincon1](https://discourse.julialang.org/u/Philippe_Maincon1)\
**Post date:** [April 28, 2023, 10:44am UTC](https://discourse.julialang.org/t/fail-to-deploy-from-documenter-to-github/98021/15 "2023-04-28T10:44:09Z")

</div>

Muito obrigado! I will read this _very_ carefully!
