elixir icon indicating copy to clipboard operation
elixir copied to clipboard

Draft: Publish docs for all versions

Open wingyplus opened this issue 3 years ago • 8 comments

Start tackle 1. for #12038. Create a new workflow that listen on push event for main and v*.* branches.

wingyplus avatar Aug 04 '22 14:08 wingyplus

@josevalim @wojtekmach Just to confirm that I understand your decision correctly. 🙇‍♂️

wingyplus avatar Aug 04 '22 14:08 wingyplus

in general this looks like it is in the correct direction. However, I have a question: Is it better to add a new workflow or to change the existing CI workflow and make it published the docs at the end?

josevalim avatar Aug 04 '22 14:08 josevalim

As I see in ci.yml:

  1. We need to add branch checking into continue-on-error to step that we want to skip. I think it make workflow quite more complicate.
  2. We have test 2 ex_doc versions. We may need to install it again to publish the docs.

So I decide to create a new workflow to just publish build artifact since we didn't care about testing but just building. What do you think?

wingyplus avatar Aug 04 '22 14:08 wingyplus

I see, So you are right, a separate workflow is better.

Maybe what we could do is to change CI first to publish the precompiled Version of Elixir for main and v*? And then in this workflow, we download the pre-compiled version from CI and publish its docs? In other words, we tackle problems in the separate order i described. :D

would that help or it is better to build elixir in this workflow anyway?

josevalim avatar Aug 04 '22 14:08 josevalim

Or we extract the steps in https://github.com/elixir-lang/elixir/blob/main/.github/workflows/release.yml#L42-L62 into workflow_call and uploading it to artifact using upload-artifact. So we can re-downloading it to use to build docs and re-using it with the release.yml.

Just an idea. Need to try first to give the real answer. 😂

wingyplus avatar Aug 04 '22 15:08 wingyplus

Ok, so let’s start by changing CI to build precompiled versions? Then we upload them to S3? :) maybe we can do it before we run tests so we don’t need to worry about continue-on-error?

josevalim avatar Aug 04 '22 15:08 josevalim

@josevalim I thinking that we should have a jobs to publish precompiled versions before publishing the docs. I have some experiment here https://github.com/wingyplus/elixir/actions/runs/2818697731. So I think the steps to make this issue done would be:

  1. Build and publish precompiled versions and upload to S3.
  2. In this same workflow, make publish docs stick with latest version and upload it to s3 because it'll recompile elixir again before building the docs but we can still separate it like pipeline example above if you're thinking that it's clearer.

I think with those steps above, the workflow will be the same as release.yml does. What do you think?

wingyplus avatar Aug 08 '22 15:08 wingyplus

:+1: for tackling the precompilation first.

josevalim avatar Aug 08 '22 15:08 josevalim

Close this in flavor of #12118

wingyplus avatar Sep 15 '22 12:09 wingyplus