PML-202 : publish multiversion documentation to OVH with citations count - #300
Open
CassNot wants to merge 2 commits into
Open
PML-202 : publish multiversion documentation to OVH with citations count#300CassNot wants to merge 2 commits into
CassNot wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add a GitHub Actions workflow that builds and publishes the Merlin multiversion documentation to OVH S3-compatible Object Storage.
The documentation is published after changes are merged into
main.The workflow can also be launched manually from the
mainbranch.Changes
.github/workflows/publish-docs.yml.upstreamremote.docs/build/html/to the configured OVH S3 prefix.aws s3 sync --delete.Deployment triggers
The publication workflow runs on:
main, including PR merges;main.Pull requests continue to use the existing documentation validation (no multiversion, just current origin branch) workflow and do not upload anything to OVH.
GitHub configuration
I created a GitHub environment named
documentation, restricted tomain.Environment secrets
OVH_S3_ACCESS_KEYOVH_S3_SECRET_KEYEnvironment variables
S3_REGIONS3_ENDPOINTS3_BUCKET_PATH, for examples3://merlin-docs/html/OPENALEX_MAILTO: the citation-fetch script sends it to OpenAlex as the mailto query parameter. It helps OpenAlex identify API traffic and historically qualified requests. I added the merlin email.The OVH deployment credential needs permission to:
public-readobject ACLs.@adi-khot , is it set on OVH ?
Deployment safety
The workflow validates all required S3 configuration before uploading.
The live destination is synchronized with
--delete, so obsolete pages and versions are removed from the currenthtml/prefix. Deployments are serialized to prevent two synchronization operations from running concurrently.@adi-khot , I was also wondering if bucket versioning or lifecycle rules could be set-up on OVH (for instance a 90-day lifecycle rule to avoid the storage to grow indefinitely (to apply on
html/prefix). I added #TODO comments regarding that in the workflow document.Proposed OVH retention policy
Once bucket versioning is enabled, the proposed lifecycle policy would:
html/;Open questions for reviewers (about lifecycle)
aws s3 sync --deleteif it is not?html/prefix?Validation
pytest -q tests/docs/test_build_multiversion.py tests/docs/test_citations.py0.10.20.30.40.4.1.0.4documentation.git diff --checkpassed.Historical
0.2documentation emits existing Sphinx warnings. These warningsremain visible but are not fatal during the historical multiversion build.
Current documentation is still validated with warnings treated as errors.