elixir
elixir copied to clipboard
Automate docs publishing to Hexdocs with GitHub Actions
Currently it is done by Bob. We want to publish docs automatically for:
- main
- each v*.* branch (without the v prefix)
- each tag
Hi @wingyplus, after discussing with @wojtekmach, we decided that we should publish nightly builds to S3, as that should be much easier. With that said, here is a proposal:
-
Let's start with this issue by publishing docs for main and v*.* branches. Note that we should publish the docs even if tests fail. This will allow us to setup S3.
-
Then let's start publishing docs for tags, it should be an addition on top of our release process.
-
Finally, we add start publishing nightly builds to S3, by extending the code implemented on step 1.
WDYT? Are you interested in tackling it?
That sounds interesting. Let me check in details in ~4 hours (9 PM in my time). 🙇
For 1, I think it could be done by using build matrix. But how many versions do we need to publish? And I'm not sure about building docs for elixir version < 1.10 (This is the first version that I start using). I think we can start by building doc on main branch to see how its work and apply it more.
For 2, I think it's not hard.
For 3, Do we still need to publish on GitHub Release? And do we need to publish builds when tag was created?
The documentation we will always generate for the last OTP version, only on Linux. I think we can allow on all branches because it is extremely unlikely I commit will be made to any branch besides 1.13 and 1.14. :)
for 3, we will push only to S3. Tags we will push to both GitHub (as we do today) and S3
Thank you for your information. I’ll take a look tomorrow. 🙇♂️
@josevalim To ExDoc or to HexDocs?
Fixed, thank you!
Hi @gilacost! So what is left now is to: push the Precompiled.zip to S3 as well (as Hex Bob does) and enable this for tags too!
Hey @josevalim, bob's build elixir_job, runs elixir.sh. This script does five things:
- builds elixir with
make compile, we are already handling this in the composite action with makePrecompile.zip - uploads docs
- uploads_build
- uploads builds_txt
- purges fastly
I've just submitted a PR that tackles this, we can refactor later, it is already mentioned in the PR description. Also I added @wingyplus as co-author for all commits in the PR ❤️ 🚀