Skip to content

Add job to trigger docs build#1665

Merged
tvdijen merged 4 commits intomasterfrom
feature/trigger-docs-build
Jul 14, 2022
Merged

Add job to trigger docs build#1665
tvdijen merged 4 commits intomasterfrom
feature/trigger-docs-build

Conversation

@tvdijen
Copy link
Copy Markdown
Member

@tvdijen tvdijen commented Jul 4, 2022

Will trigger a build of the https://github.com/simplesamlphp/docs repo if any of the .md-files have changed.

Downsides:

  • it requires a personal access token of a user-account. In this case I created one under my account and added it to the secrets-vault.
  • it would require us to generate tokens not just in this repo, but for all modules.

Closes simplesamlphp/docs#2

@thijskh
Copy link
Copy Markdown
Member

thijskh commented Jul 5, 2022

It looks good. Having the personal access token is not ideal but we can live with it I guess (would be great if repos in the same org could just share these kind of basic permissions). For every module would be nice but not a hard requirement per se I guess since these change not so often.

It should only run when md files are changed in main or any of the release branches I guess? So it does not get triggered on every PR (commit)? Maybe it's not essential.

@tvdijen
Copy link
Copy Markdown
Member Author

tvdijen commented Jul 5, 2022

Maybe it's possible, but I haven't been able to find a way to set these permissions generically.
I'll see if I can further limit it to the master- and release-branches..

@tvdijen
Copy link
Copy Markdown
Member Author

tvdijen commented Jul 5, 2022

I'm in doubt... The best way to run this only on specific branches is to create a separate workflow..
The downside is that it will run, even if the unit tests fail.. The upside is, that's maybe a good thing.. Because markdown !== PHP

@tvdijen tvdijen force-pushed the feature/trigger-docs-build branch 21 times, most recently from 2786454 to afeb457 Compare July 9, 2022 16:11
@tvdijen
Copy link
Copy Markdown
Member Author

tvdijen commented Jul 9, 2022

OK, so I've moved everything to a separate workflow that will only be triggered on changes to .md files on the master-branch and release-branches and also added a spell checker.
The markdown-linter and spell check are always being run, however the 'docs build' step will only run on push-events.
Thanks to this generic workflow, we can simply copy the yaml-file to all of our modules.

@tvdijen tvdijen force-pushed the feature/trigger-docs-build branch from afeb457 to ee3949a Compare July 9, 2022 16:20
@tvdijen tvdijen force-pushed the feature/trigger-docs-build branch from ee3949a to a71779d Compare July 14, 2022 19:48
@tvdijen tvdijen merged commit 8205f8e into master Jul 14, 2022
@tvdijen tvdijen deleted the feature/trigger-docs-build branch July 14, 2022 19:53
@tvdijen tvdijen restored the feature/trigger-docs-build branch July 14, 2022 19:53
@tvdijen tvdijen deleted the feature/trigger-docs-build branch July 14, 2022 20:09
@github-actions
Copy link
Copy Markdown
Contributor

\n This pull request has been automatically locked since there has \n not been any recent activity after it was closed.\n Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Trigger docs rebuild on main repo change

2 participants