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

Trigger docs only when something inside the docs folder changed #2587

Merged
merged 44 commits into from
May 10, 2024

Conversation

KasukabeDefenceForce
Copy link
Contributor

@KasukabeDefenceForce KasukabeDefenceForce commented Apr 16, 2024

📝 Description

Type: 🎢 infrastructure
I am trying to implement a conditional logic in the docs workflow so that the docs trigger only if there is a change in any of the files in the docs directory.

📌 Resources

Examples, notebooks, and links to useful references.

🚦 Testing

How did you test these changes?

  • Testing pipeline
  • Other method (describe)
  • My changes can't be tested (explain why)

☑️ Checklist

  • I requested two reviewers for this pull request
  • I updated the documentation according to my changes
  • I built the documentation by applying the build_docs label

Note: If you are not allowed to perform any of these actions, ping (@) a contributor.

@KasukabeDefenceForce KasukabeDefenceForce force-pushed the master branch 4 times, most recently from 9b6e30b to 9e86bba Compare April 16, 2024 13:45
@KasukabeDefenceForce KasukabeDefenceForce marked this pull request as ready for review April 16, 2024 16:39
@andrewfullard
Copy link
Contributor

Why are the tests failing in this PR?

@atharva-2001
Copy link
Member

Can you please include example workflows- conditions when the workflow ran successfully?

Copy link
Member

@atharva-2001 atharva-2001 left a comment

Choose a reason for hiding this comment

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

Thanks, Abhinav, I believe the workflow will now run if there are changes in the docs folder. But someone will still be able to run it manually too using the build-docs label(without skipping), as a test?

.github/workflows/build-docs.yml Outdated Show resolved Hide resolved
@atharva-2001
Copy link
Member

atharva-2001 commented Apr 17, 2024

Why are the tests failing in this PR?

The regression cache was corrupt(size was in bytes). Deleted the cache and now it works.

@KasukabeDefenceForce
Copy link
Contributor Author

Thanks, Abhinav, I believe the workflow will now run if there are changes in the docs folder. But someone will still be able to run it manually too using the build-docs label(without skipping), as a test?

What should be its behavior when we manually run it? If there are no changes in the docs then it should not do anything or it should run all the steps?

@andrewfullard
Copy link
Contributor

With build-docs label: should always run the full docs build on PR commits
With force run in actions list: run the full docs build
With docs change: automatically run the full docs build

@KasukabeDefenceForce
Copy link
Contributor Author

Thanks, Abhinav, I believe the workflow will now run if there are changes in the docs folder. But someone will still be able to run it manually too using the build-docs label(without skipping), as a test?

Yes, we can run it manually, by either manually running the workflow or by adding the build docs label to the PR.

@atharva-2001
Copy link
Member

There is a merge conflict. Also, can you provide example workflow links?

@KasukabeDefenceForce
Copy link
Contributor Author

There is a merge conflict. Also, can you provide example workflow links?

Here are the workflow links which i an on my personal forks:
DOC Change:
https://github.com/KasukabeDefenceForce/tardis/actions/runs/8940316781
NON DOC CHANGE:
https://github.com/KasukabeDefenceForce/tardis/actions/runs/8940347093
BUILD_DOCS LABEL:
https://github.com/KasukabeDefenceForce/tardis/actions/runs/8940393897

@andrewfullard andrewfullard requested a review from atharva-2001 May 9, 2024 18:51
@andrewfullard andrewfullard enabled auto-merge (squash) May 10, 2024 14:15
@andrewfullard andrewfullard merged commit 7e7069a into tardis-sn:master May 10, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants