Skip to content

Simplify documentation CI#306

Merged
ValerianRey merged 6 commits intomainfrom
fix-doc-ci
Apr 8, 2025
Merged

Simplify documentation CI#306
ValerianRey merged 6 commits intomainfrom
fix-doc-ci

Conversation

@ValerianRey
Copy link
Copy Markdown
Contributor

@ValerianRey ValerianRey commented Apr 8, 2025

  • Make build-deploy-docs.yml not trigger on PR
  • Change Build_and_deploy_doc to run in the prod-documentation environment
  • Change Build_and_deploy_doc job name
  • Remove cleanup-pr-docs.yml
  • Revert change in CONTRIBUTING.md explaining how to preview PRs
  • Rename main folder to latest

This PR removes support for documentation build preview in PRs, because we cannot have a satisfying solution with GitHub Pages that will also work with forks.

It also fixes a security issue of having the DOCUMENTATION_DEPLOY_KEY be a repository-wide secret not protected by any environment. To avoid this, it uses instead the new PROD_DOCUMENTATION_DEPLOY_KEY, which is an environment secret of the new prod-documentation environment, tied to the main branch or the version tags. This private key matches the new public deploy key PROD_DOCUMENTATION_DEPLOY_KEY of TorchJD/documentation, that has write access to it.

Lastly, this PR improves the name of the job by using the dedicated name field and renames the main folder to latest.

Short-term future steps after merging this:

  • Remove the DOCUMENTATION_DEPLOY_KEY private key from TorchJD/torchjd and the associated public key from TorchJD/documentation.
  • Manually remove existing pr/* folders in TorchJD/documentation.
  • Manually remove the existing main folder in TorchJD/documentation.

Long-term future steps:

  • Add support for PR preview whenever GitHub Pages supports this, or by switching to readthedocs or another tool supporting this. Since this is quite a bit of work and possibly comes with a monthly subscription (like 5$/month for readthedocs), we will only do this when it becomes much more important.

@ValerianRey ValerianRey added the cc: ci Conventional commit type for changes to the CI (Github workflows and actions). label Apr 8, 2025
@ValerianRey ValerianRey self-assigned this Apr 8, 2025
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ValerianRey ValerianRey changed the title Fix documentation CI Simplify documentation CI Apr 8, 2025
Copy link
Copy Markdown
Contributor

@PierreQuinton PierreQuinton left a comment

Choose a reason for hiding this comment

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

LGTM. Just wondering, should we change deploy to main to deploy to latest? If so we would have latest, stable and one for each version.

@ValerianRey ValerianRey merged commit 2eaddf3 into main Apr 8, 2025
14 checks passed
@ValerianRey ValerianRey deleted the fix-doc-ci branch April 8, 2025 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cc: ci Conventional commit type for changes to the CI (Github workflows and actions).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants