Skip to content

feat: Auto publish docs to version "develop" #269

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 22 commits into from
Dec 8, 2021

Conversation

ijemmy
Copy link
Contributor

@ijemmy ijemmy commented Dec 7, 2021

Description of your changes

Auto publish docs to version "develop".

Every time we merge a change to main, we will publish a new version of document on "develop" version. (Instead of 1.1.0, 1.2.0, etc. which are published only when we release.). All of our docs are kept in the branch "gh-pages". The branch is special as it doesn't contain any source code, only published docs.

In the workflow, we publish the docs using two tools: mkdocs and mike. mkdocs generates a static website from ./doc into./site folder.

mike runs on the top of mkdocs to generate a new version into another directory. The idea of mike is that we keep the older version of doc published and never touch it. When we release a version 1.2.0, mike will create a new folder named 1.2.0 and put the new version of mkdocs generated site there. All of these happens in the "gh-pages" branch.

In this workflow, when we push to main branch, we will regenerate the special version "develop". This will replace the folder "develop" with the latest generated doc. (We also have the alias "latest" for the latest release version. This will be covered in the release workflow).

How to verify this change

Check out code from "gh-pages" branch. Run

cd develop
python3 -m http.server

You should see the mkdocs site in localhsot.

Related issues, RFCs

#152

PR status

Is this ready for review?: YES
Is it a breaking change?: NO

Checklist

  • My changes meet the tenets criteria
  • I have performed a self-review of my own code
  • I have commented my code where necessary, particularly in areas that should be flagged with a TODO, or hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • The code coverage hasn't decreased
  • I have added tests that prove my change is effective and works
  • New and existing unit tests pass locally and in Github Actions
  • Any dependent changes have been merged and published in downstream module
  • The PR title follows the conventional commit semantics

Breaking change checklist

  • I have documented the migration process
  • I have added, implemented necessary warnings (if it can live side by side)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link
Contributor

@dreamorosi dreamorosi left a comment

Choose a reason for hiding this comment

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

LGTM :)

@ijemmy ijemmy marked this pull request as ready for review December 8, 2021 11:42
@ijemmy ijemmy merged commit aa7e77a into main Dec 8, 2021
@ijemmy ijemmy deleted the feat/github-workflow-publish-doc branch December 8, 2021 11:43
@heitorlessa heitorlessa added the internal PRs that introduce changes in governance, tech debt and chores (linting setup, baseline, etc.) label Jan 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal PRs that introduce changes in governance, tech debt and chores (linting setup, baseline, etc.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants