INWTlab / shinyMatrix

https://inwtlab.github.io/shinyMatrix/
Other
19 stars 6 forks source link

Deployment of R-Package to INWTlab drat Repo #40

Closed jan-abel-inwt closed 6 months ago

jan-abel-inwt commented 6 months ago

We are currently not automatically deploying the R-package to the INWTlab drat repository. While there is a travis.yaml file present, indicating that Travis was previously utilized, I plan to transition the package deployment to a GitHub Actions workflow.

jan-abel-inwt commented 6 months ago

This will be helpful:

https://github.com/mikemahoney218/upload-to-drat-repo/

https://www.mm218.dev/posts/2021-09-22-automated-drat-uploads-with-github-actions/

jan-abel-inwt commented 6 months ago

It seems there are differences between the behavior of the action and the script we used before:

  1. The action is creating the src/contrib folder at the root of the repository.
  2. In our version, there's an extra docs directory, resulting in docs/src/contrib.

Do we need this extra docs folder, @wahani? What purpose does it serve?

Additionally, the action doesn't generate an archive using drat::archivePackages. I believe it would be beneficial to include one.

wahani commented 6 months ago

If I remember correctly, the docs folder can be picked up by GH pages to serve the repo. Maybe that's why? I guess we have defined it slightly differently in our repo.

The source and previous versions all live in inwtlab, so getting one of those is simple. Also I think you still can't just install a particular version with install.packages, so in summary I don't believe we lose much if we don't archive.

If you feel like forking the action, I would also be fine with that. Or propose to implement those features upstream, maybe?

jan-abel-inwt commented 6 months ago

I see. I'm considering moving our drat repository from the docs folder to a gh-pages branch. This change aligns with the default settings in the drat functions and the drat action.

I also suggested the idea of using archivePackages to the author of the action, which I believe would be a more elegant solution.

For now i cleaned up the drat Repo manually and created the archive.

jan-abel-inwt commented 6 months ago

You can now specify to archive packages in the workflow file.

Additionally, I've made the following updates to the Drat repository mentioned in my previous post:

To test all that, i redeployed shinyMatrix 0.8.0 to our drat via the updated workflow. This seems to work fine now.