Raku / doc-website

Tooling to build/run the documentation website
Artistic License 2.0
7 stars 10 forks source link

Add EBook compilation to website build + container #371

Closed dontlaugh closed 3 months ago

dontlaugh commented 3 months ago

The build script drops the ebook file in our repository root. We can move it into the rendered_html folder before archiving. This way, when the archive is unpacked inside the container, it's located at the expected root url.

The buildscript should be adjusted to put the ebook in rendered_html at some point. But this hack works for now.

dontlaugh commented 3 months ago

Richard's recommendation on updating the buildkite steps were basically correct. I just move the ebook into the rendered_html directory before making a tarball. The tarball's folder structure is served statically after it's unpacked inside the container. So adding the ebook in there just works, since the file's set up to serve from the root. References #356

dontlaugh commented 3 months ago

hmm... The build failed. Gotta look into why that's different up in the build environment vs. my local env.

dontlaugh commented 3 months ago

okay something is off with the build envs; i'll need to look at this tomorrow night.

finanalyst commented 3 months ago

You must not remove completion in the EBook mode. !!!!!!!

Take out --without-completion

The plugin running in the completion stage here turns the unzipped file into an epub (zips it with the correct directories).

By contrast in the Website mode, a croapp plugin runs in the completion stage, and that serves the html files if run locally. So --without-completion is needed for the build process for website.

  1. No need to move the ebook with a bash command. Just adjust the conf/config-plugin file. The name of the ebook and its path are set there. The file is something like 'EBook/configs/3-plugin-configs' and the field should be obvious

On Tue, 7 May 2024, 03:16 Coleman McFarland, @.***> wrote:

@.**** commented on this pull request.

In .buildkite/pipeline.yaml https://github.com/Raku/doc-website/pull/371#discussion_r1591731326:

    • ./bin_files/build-site --without-completion --no-status EBook
    • mv RakuDocumentation.epub rendered_html

Only two lines have substantive changes. The others are just me removing the quoted strings to make everything unquoted and consistent.

— Reply to this email directly, view it on GitHub https://github.com/Raku/doc-website/pull/371#pullrequestreview-2041943169, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACYZHAZZ66C4G74O2KGCDLZBA2QBAVCNFSM6AAAAABHKCOXVCVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDANBRHE2DGMJWHE . You are receiving this because you are subscribed to this thread.Message ID: @.***>

finanalyst commented 3 months ago

@dontlaugh There are two steps needed:

Both need to happen. It seems to me, unless I have misunderstood, that you are only running one (EBook) and removed the build step of the Website.

The syntax is build-site <options> MODE where MODE is 'EBook' or 'Website'

for Website should include `--without-completion` options for EBook should not.
dontlaugh commented 3 months ago

I see now. I only had to invoke the build script once locally, but that was because the static site had already been built (leftover state on disk).

dontlaugh commented 3 months ago

@finanalyst Thank you for updating the scripts and config for me!

I have deployed this change to prod, and the ebook is available for download now.