IDinsight / ask-a-question

Trustworthy question-answering AI plugin for chatbots in the social sector with advanced content performance analysis.
https://ask-a-question.com
BSD 3-Clause "New" or "Revised" License
27 stars 4 forks source link

[AAQ-729] Add mkdocs versioning #353

Closed suzinyou closed 1 month ago

suzinyou commented 1 month ago

Reviewer: @markbotterill Estimate: 30min


Ticket

Fixes: https://idinsight.atlassian.net/browse/AAQ-729

Description

Goal

Add versioning to mkdocs.

Changes

image
  1. Add mike versioning as per mkdocs' documentation
  2. Update docs github actions so that we only publish docs on release
  3. Update docs actions to
    1. fetch existing gh_pages branch
    2. run mike to add new version and push the changes
    3. Add and commit a CNAME file manually which should contain the custom domain. This is because mike does not handle non-versioned files (see their instructions
  4. Update actions to versions that use Node 20

Future Tasks

How has this been tested?

  1. I created a fake version (v0.1.1-test) instead of using ${{ github.ref_name }} in the docs.yaml. Pushed this.
  2. Went to Github Actions - Deploy Docs -> workflow dispatch at this branch AAQ-729-doc-version
  3. Check that a new version has been added to docs.ask-a-question.com
  4. Check that older versions are still there

To-do before merge

I will

Checklist

Fill with x for completed.