Skip to content

Add CI workflow to deploy a versioned MkDocs-based website to GitHub Pages #64

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

Merged
merged 8 commits into from
Jun 23, 2021

Conversation

umbynos
Copy link
Contributor

@umbynos umbynos commented Jun 22, 2021

On every push to the repository's default branch, deploy the repository's MkDocs-based static website to GitHub Pages.

Documentation content will sometimes apply only to a specific version of the project. For this reason, it's important
for the reader to be able to access the documentation for the specific version of the project they are using.

With the help of mike, the documentation system provides access to:

  • The tip of the default branch ("dev")
  • The latest release ("latest")
  • Each minor version series (e.g., "1.2")

The website version is selectable via a menu on the website as well as the URL of each documentation page.

@umbynos umbynos requested a review from a team June 22, 2021 10:24
@umbynos umbynos self-assigned this Jun 22, 2021
@umbynos umbynos added the topic: documentation Related to documentation for the project label Jun 22, 2021
…Pages

On every push to the repository's default branch or release branch, deploy the repository's MkDocs-based static website
to GitHub Pages.

Documentation content will sometimes apply only to a specific version of the project. For this reason, it's important
for the reader to be able to access the documentation for the specific version of the project they are using.

The documentation system provides access to:

- The tip of the default branch ("dev")
- The latest release ("latest")
- Each minor version series (e.g., "1.2")

The website version is selectable via a menu on the website as well as the URL of each documentation page.
Copy link
Contributor

@per1234 per1234 left a comment

Choose a reason for hiding this comment

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

You missed adding the "base assets":
https://github.com/per1234/tooling-project-assets/blob/main/workflow-templates/deploy-mkdocs-versioned-poetry.md#1-install-workflow-and-assets
UPDATE: I missed that the repository already had a website set up

I recommend adding the "Check Website" workflow as a companion to this one:
https://github.com/per1234/tooling-project-assets/blob/main/workflow-templates/check-mkdocs-task.md
That taskfile template also provides a website:serve task that is super useful for local testing during development on the website.

@umbynos umbynos requested a review from per1234 June 22, 2021 16:32
Copy link
Contributor

@per1234 per1234 left a comment

Choose a reason for hiding this comment

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

In order for the versioned website to work, it's necessary to add this to mkdocs.yml:

extra:
  version:
    provider: mike

Reference

Co-authored-by: per1234 <[email protected]>
@umbynos umbynos merged commit b9b8c40 into main Jun 23, 2021
@umbynos umbynos deleted the umbynos/docs branch June 23, 2021 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: documentation Related to documentation for the project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants