Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How does ./gradlew publish work with GitHub Pages? #51

Closed
jonathandao0 opened this issue Jan 18, 2025 · 1 comment
Closed

How does ./gradlew publish work with GitHub Pages? #51

jonathandao0 opened this issue Jan 18, 2025 · 1 comment

Comments

@jonathandao0
Copy link

Reference repo I'm working off of: https://github.com/4201VitruvianBots/Codex

Following the advice from #50, I created a new robot project as the template and copied over the contents of publish.gradle over into it. The issue I'm running into and trying to understand is how the publish gradle task works and how it hosts the Maven artifacts on to the repo's github.io page so that I can update the Maven URL in the vendordep.json file. Looking at how other vendordeps work (YAGSL, PathPlanner, Phoenix6, etc.), I can't seem to figure out how this gets facilitated.

My current understanding is that the ./gradlew publish -Pthirdparty command in the ci.yml file runs publish.gradle, which uses the releasesRepoUrl is used as an extension of the GitHub's page's path to point to where the Maven repo is. Additionally, the vendordep.json file gets placed separately using the vendordepJson() task since it is specific to WPILib and not a Maven artifact. So for my repo, if I set releasesRepoUrl to use public/repo and I set the vendordepJson() task to put the vendordep under the public folder, I should be able to get my vendordep with the URL https://4201vitruvianbots.github.io/Codex/public/frc4201Codex.json and one of the jar files of the library at https://4201vitruvianbots.github.io/Codex/public/repos/org/team4201/Codex-java/2025.0.1/Codex-java-2025.0.1.jar, but this doesn't seem to work. Is there a GitHub pages setting I'm supposed to enable?

@jonathandao0
Copy link
Author

Okay, I realized I had a misunderstanding. When using GitHub pages on a repo where you are deploying from a branch, you generally need to run ./gradlew publish locally and then push the artifacts up as part of the repo in order for it to be hosted. You can do a GitHub action to do this automatically as a separate commit if you want to (what YAGSL does).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant