Skip to content

Only build documentation if files under docs folder changed #16131

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

Closed
wants to merge 1 commit into from

Conversation

r0qs
Copy link
Member

@r0qs r0qs commented Jul 22, 2025

This PR addresses one suggestion from: #16125.

I've added a dynamic configuration in our CircleCI setup to run documentation builds only when files in the docs folder are modified (reference: https://circleci.com/docs/dynamic-config/#use-dynamic-configuration).

Note that workflow reruns may fail due to how CircleCI's dynamic setups work:

A pipeline can only be continued once. A pipeline cannot be continued with another setup configuration.
Workflow reruns will fail as part of this restriction. Rather than rerun a setup workflow you can trigger a new pipeline.

To be able to do that, I enabled the following option in the project CircleCI configuration: Project settings > Advanced -> Dynamic config using setup workflows

@r0qs r0qs force-pushed the docs-workflow branch 3 times, most recently from 03d3a5d to d1745ac Compare July 22, 2025 11:39
@r0qs r0qs marked this pull request as draft July 22, 2025 11:51
mapping: |
docs/.* run-docs-workflow true
base-revision: develop
config-path: .circleci/config.yml
Copy link
Member Author

@r0qs r0qs Jul 22, 2025

Choose a reason for hiding this comment

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

Apparently, we cannot use the same config for different logics, so we will need to split the configuration in 3 to be able to perform such separation of workflows. Basically, we will have a setup configuration in config.yml and more two, one for code changes and one for docs. We may add more later. See: https://circleci.com/docs/using-dynamic-configuration/#generate-a-config-file-based-on-modified-files

@sbillig
Copy link
Contributor

sbillig commented Jul 22, 2025

I think this should be run as a github action and avoid a circleci job at all, to avoid the $15 charge each time a new person submits a trivial docs change.

@r0qs r0qs closed this Jul 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants