Together-Java / ModernJava

Book teaching how to write modern and effective Java. It is maintained by the community, anyone can contribute.
https://together-java.github.io/ModernJava/
Apache License 2.0
32 stars 22 forks source link

Auto-deployment to gh-pages #3

Closed Zabuzard closed 1 year ago

Zabuzard commented 1 year ago

Initially, we use gh-pages to publish our website (https://together-java.github.io/ModernJava/). This is automatically deployed from the gh-pages branch.

Currently, we tried using an existing gh-action that, on pushes to master, builds the book and pushes it to the gh-pages branch. For some reason, the action fails:

https://github.com/Together-Java/ModernJava/actions/runs/3891853695 errors

Either we investigate and fix the action, or we do it ourselves. mdBook actually has a guide for this: https://github.com/rust-lang/mdBook/wiki/Automated-Deployment%3A-GitHub-Pages

But essentially, all that has to be done is:

Zabuzard commented 1 year ago

@marko-radosavljevic maybe sth for u? 🙂

marko-radosavljevic commented 1 year ago

Sure, I can take a look. :relaxed:

marko-radosavljevic commented 1 year ago

The new workflow seems to be working well. @Zabuzard

I will monitor it for a few days, while we test it out properly. ^^

It's using already existing actions, that are being actively maintained: https://github.com/peaceiris/actions-gh-pages https://github.com/peaceiris/actions-mdbook

Which is good enough to get us started, but we will probably have to do it manually when we switch to more complex scenarios with mdbook plugins and pipeline tooling.

Zabuzard commented 1 year ago

lovely 👍