# Deploying documentation with Documenter (automatically with each new push to the repo)

**URL:** <https://discourse.julialang.org/t/deploying-documentation-with-documenter-automatically-with-each-new-push-to-the-repo/57615>\
**Category:** General Usage\
**Tags:** package, documentation\
**Created:** [March 20, 2021, 5:37pm UTC](https://discourse.julialang.org/t/deploying-documentation-with-documenter-automatically-with-each-new-push-to-the-repo/57615 "2021-03-20T17:37:41Z")\
**Posts on this page:** 6\
**Page:** 2

<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:** [March 23, 2023, 8:15pm UTC](https://discourse.julialang.org/t/deploying-documentation-with-documenter-automatically-with-each-new-push-to-the-repo/57615/21 "2023-03-23T20:15:13Z")

</div>

It may be that your `docs/Project.toml` must _not_ reference the package itself. At least it is not in some non-registered packages I have, and I can see that if it was an error like that could occur.

---

<div class="post-metadata">

**Author:** ![Shayan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/shayan/32/33025_2.png) [@Shayan](https://discourse.julialang.org/u/Shayan)\
**Post date:** [March 23, 2023, 8:32pm UTC](https://discourse.julialang.org/t/deploying-documentation-with-documenter-automatically-with-each-new-push-to-the-repo/57615/22 "2023-03-23T20:32:05Z")

</div>

Okay, but how will the workflow find the unregistered MFF package if I don’t add it as a dependency?  
After all, I interpret your comment as follows:  
I should remove the `MFF` dependency from the `Project.toml` file in the `/docs` dir.

---

<div class="post-metadata">

**Author:** ![vettert](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vettert/32/30599_2.png) [@vettert](https://discourse.julialang.org/u/vettert)\
**Post date:** [March 23, 2023, 8:53pm UTC](https://discourse.julialang.org/t/deploying-documentation-with-documenter-automatically-with-each-new-push-to-the-repo/57615/23 "2023-03-23T20:53:56Z")

</div>

Maybe you can “Pkg.dev” your package with a relative path instead?

---

<div class="post-metadata">

**Author:** ![Shayan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/shayan/32/33025_2.png) [@Shayan](https://discourse.julialang.org/u/Shayan)\
**Post date:** [March 23, 2023, 9:38pm UTC](https://discourse.julialang.org/t/deploying-documentation-with-documenter-automatically-with-each-new-push-to-the-repo/57615/25 "2023-03-23T21:38:52Z")

</div>

Can you please clarify?  
I’ve already added the package in dev mode using `] dev <LINK_TO_THE_PACKAGE>`.

---

<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:** [March 24, 2023, 12:45am UTC](https://discourse.julialang.org/t/deploying-documentation-with-documenter-automatically-with-each-new-push-to-the-repo/57615/26 "2023-03-24T00:45:45Z")

</div>

What I can say is that, for instance, the JuliaNotes.jl doesn’t have that. Another package I have doesn’t even have a Project.toml file in the docs folder, so I’m not sure what exactly is it for. I don’t have doc tests in those packages, though.

I usually follow very strictly that step by step and it works. Starting by generating the package with PkgTemplates.

---

<div class="post-metadata">

**Author:** ![NeroBlackstone](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/neroblackstone/32/208679_2.png) [@NeroBlackstone](https://discourse.julialang.org/u/NeroBlackstone)\
**Post date:** [April 25, 2024, 2:33pm UTC](https://discourse.julialang.org/t/deploying-documentation-with-documenter-automatically-with-each-new-push-to-the-repo/57615/27 "2024-04-25T14:33:24Z")

</div>

I found that sometimes the gh-pages branch is not automatically created as described [in the documenter.jl documentation](https://documenter.juliadocs.org/stable/man/hosting/#gh-pages-Branch) , and needs to be created manually as described [here](https://m3g.github.io/JuliaNotes.jl/stable/publish_docs/#Create-an-empty-gh-pages-branch-and-choose-it-to-deploy-the-page), and commit to the main branch again to trigger the ci update.

I leave a comment here for someone encounter same problem

[Previous page](https://discourse.julialang.org/t/deploying-documentation-with-documenter-automatically-with-each-new-push-to-the-repo/57615.md?page=1)
