This commit is contained in:
Tom van Woudenberg 2025-02-24 20:55:20 +01:00
parent c2db440f10
commit 5ae094a9f5
2 changed files with 12 additions and 1 deletions

View file

@ -21,7 +21,7 @@ Finally, you might consider publishing your book at an online publisher. This co
So, there's a few use-cases for which different (combinations) of solutions exist. These are summarized in the table below. You can combine use-cases to your liking:
| Use-case | [Publish version on separate URLs](./versios_URLs.md) | [Use TeachBooks versioning with a changelog](versioning_changelog) | [Keep old versions online](./versioning_archived.md) | [Keep source code of old versions online](./versioning_archived.md) | [Publish your book officially](./publisher.md) |
| Use-case | [Publish version on separate URLs](./versions_URLs.md) | [Use TeachBooks versioning with a changelog](versioning_changelog) | [Keep old versions online](./versioning_archived.md) | [Keep source code of old versions online](./versioning_archived.md) | [Publish your book officially](./publisher.md) |
|:---:|:---:|:---:|:---:|:---:|:---:|
| Book changes over time, but you don't want to deal with versioning | | | | | |
| Taylor-made book per academic year | Recommended | | Recommended | Can be considered | |

View file

@ -0,0 +1,11 @@
# Keep source code and website of all versions
Although you might only want to share the most recent version of the book with your readers, it might be useful too the have the source code and website of older versions somewhere too.
Git allows you to go back in the git history to the source code of old versions. To make this as easy as possible for readers, use tags and releases instead of having the readers scroll through a long list of (not alway very descriptive) commit descriptions.
To share the built book / website of old versions for your book on GitHub you've a few options:
- add a zip of the built book to the release in GitHub as binary asset. This requires readers to download the zip and open the html files locally, but doesn't require you to host it somewhere. This zip can be easily downloaded as an artifact from [the GitHub action](../external/deploy-book-workflow/README.md). An example can be found [here](https://github.com/TUDelft-books/CME4501/releases/tag/v2024.1.0)
- create a branch for each tag. When doing this, [the GitHub workflow](../external/deploy-book-workflow/README.md) will build it on GitHub pages. It's advised to use the version as branch name. You can create a branch from a tag locally by running: `git branch <new_branch name> <tag/version>`. Note that when you've many version and a large book, this approach might easily fill up your 1 GB GitHub pages limit.
- Use [Read the Docs](../features/pull_request_build.md) to build a website for all your tags. Refer to the URL of this built from your GitHub release. To enable this functionality in Read the Docs, apply the following settings in [your Read the Docs dashboard](https://app.readthedocs.org/dashboard/): go to `Setup` - `Settings` - `Automation rules` - `Add rule` and set `Description`: 'Build all tags', `Match`: `Custom Match`, `Custom match`: `.*`, `Version type`: `Tag`, `Action`: `Activate version`
If you've your own webserver, you can publish each version on it manually.