Skip to content
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

ci: fix and revamp how we publish documentation with mike #402

Merged
merged 1 commit into from
Apr 25, 2024

Conversation

joanise
Copy link
Member

@joanise joanise commented Apr 22, 2024

Based on: roedoejet/g2p#342

  • fix publishing the docs on release: using the artifact does not work since mike rebuilds on each call to "mike deploy"
  • adopt the same versioning model as g2p: dev is the current main, 0.1.0 and other tags for published versions, stable is an alias to the most recently published tag, latest is an alias to the most recent thing, be that a version or the current main.

Just before merging this PR, we need to manually do

mike delete --all
mike deploy -u dev latest
git push origin gh-pages

to restart the docs with this changed model. Otherwise, docs.yaml will fail with this error:

error: alias 'latest' already specified as a version

PR Goal?

Fix the broken documentation publication part of the publish workflow.

Fixes?

Fixes #401

Feedback sought?

Double check that the suggested publication model (i.e., mimicking g2p) is OK, and make sure the CI code is OK.

Priority?

Should be merged before the next tag push.

Tests added?

n/a

How to test?

Manually tested via temporary workflow in branch dev.ej/fix-publish-docs-testing
Workflow results: https://github.com/roedoejet/EveryVoice/actions/runs/8790552488
docs is the usual docs.yaml, while doc-deploy is copy-pasted from publish.yaml.
Both fail as expected on mike deploy with the error "error: alias 'latest' already specified as a version" and will therefore work when I do the pre-requisite manual patch to branch gh-pages.

Confidence?

High

Version change?

nope

Based on: roedoejet/g2p#342

 - fix publishing the docs on release: using the artifact does not work since
   mike rebuilds on each call to "mike deploy"
 - adopt the same versioning model as g2p: dev is the current main, 0.1.0 and
   other tags for published versions, stable is an alias to the most recently
   published tag, latest is an alias to the most recent thing, be that a
   version or the current main.

Just before merging this PR, we need to manually do

```
mike delete --all
mike deploy -u dev latest
git push origin gh-pages
```

to restart the docs with this changed model. Otherwise, docs.yaml will fail
with this error:
> error: alias 'latest' already specified as a version
Copy link
Contributor

CLI load time: 0:00.30
Pull Request HEAD: 06cac3f7bde25c6c204f32bf6f471184d2e94b8a
Imports that take more than 0.1 s:
import time: self [us] | cumulative | imported package

Copy link

codecov bot commented Apr 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.29%. Comparing base (23e4c27) to head (06cac3f).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #402   +/-   ##
=======================================
  Coverage   73.29%   73.29%           
=======================================
  Files          43       43           
  Lines        2816     2816           
  Branches      462      462           
=======================================
  Hits         2064     2064           
  Misses        668      668           
  Partials       84       84           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@roedoejet roedoejet left a comment

Choose a reason for hiding this comment

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

Awesome - thanks for tackling this @joanise !

@joanise joanise merged commit 3eafd6e into main Apr 25, 2024
4 checks passed
@joanise joanise deleted the dev.ej/fix-publish-docs branch April 25, 2024 16:18
@joanise
Copy link
Member Author

joanise commented Apr 25, 2024

Corrected recipe to manually fix the gh-pages after merging this PR...

mike delete --all
mike deploy -u dev latest
mike set-default dev
git checkout gh-pages
echo docs.everyvoice.ca > CNAME
git add CNAME
git commit -m "Restores CNAME"
git push origin gh-pages

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docs publication part of publish workflow is broken
2 participants