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

publishMultiversionMicrosite and fix GHPagesPlugin publishing #388

Merged
merged 7 commits into from
Dec 4, 2019

Conversation

calvellido
Copy link
Contributor

  • Change return value in pushMicrosite GHPagesPlugin case.
  • Override ghpagesPrivateMappings task, to set own build site directory.
  • Create new publishMultiversionMicrosite task to publish exactly that :)
  • Update docs.
  • Fix typo in error message.

@calvellido calvellido changed the title Fix GHPagesPlugin publishing method publishMultiversionMicrosite and fix GHPagesPlugin publishing Dec 4, 2019
@@ -450,6 +449,9 @@ trait MicrositeAutoImportSettings extends MicrositeKeys {
makeMultiversionMicrosite := {
Def.sequential(createMicrositeVersions, clean, makeVersionedMicrosite, moveMicrositeVersions)
}.value,
ghpagesPrivateMappings := {
sbt.Path.allSubpaths((target in makeSite).value).toList
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this is what makes the trick for both publishMicrosite and publishMultiversionMicrosite, correct?

Copy link
Contributor Author

@calvellido calvellido Dec 4, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it is!

publishMicrosite and publishMultiversionMicrosite are just different compositions of other tasks, with both of them including pushSite. This task will be the one affected by this ghpagesPrivateMappings, where in the case of using GHPagesPlugin, instead of recreate the site, the content to be uploaded will be read from target in makeSite (i.e. project/target/site).

Probably in the future we might want to simplify the command, and just use one approach or the other depending on the settings established by the user (e.g. micrositeVersionList values).

I ended up defining the task directly, instead of using an auxiliary one, which in the end it was only adding boilerplate IMO.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@calvellido calvellido merged commit fa2f859 into master Dec 4, 2019
@calvellido calvellido deleted the jv-fix-ghpages branch December 4, 2019 13:07
@calvellido calvellido mentioned this pull request Dec 4, 2019
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

Successfully merging this pull request may close these issues.

2 participants