dokka icon indicating copy to clipboard operation
dokka copied to clipboard

Publish examples to GitHub Actions Artifacts

Open StefMa opened this issue 4 years ago • 1 comments

Currently contributors who create Pull Requests are not able to see their changes directly. But, even worse, also maintainers are not able to see the changes made by the contributor without checking out the branch and build a sample.

There is, however, a GitHub Action to upload examples to a "Dokka S3". But this action only runs on push and therefore limited to maintainers of the Dokka repository. I guess this has a simple reason: Do not push everything to S3, cause this costs.

Anyways. There is another solution to make these examples available to everyone which costs dokka (Jetbrains) nothing: Using GitHub Actions Artifacts.

Each PR (and each commit on that PR) will create the samples and upload it to the GH Actions Artifacts. If someone wants to take a look at the changes. Simply go to the GH Actions page, download the artifact and open the index.html.

I already played a little bit with that and it worked great. We only have to replace the S3 upload to

      - name: Copy files to GitHub Actions Artifacts
        uses: actions/upload-artifact@v2
        with:
          name: dokka-coroutines
          path: coroutines

(coroutines as an example).

What do you think about this? Does this make sense? Would this make things easier?

StefMa avatar Dec 15 '20 17:12 StefMa

It would be great if you create a PR to implement this.

vmishenev avatar Jul 28 '22 13:07 vmishenev