-
Notifications
You must be signed in to change notification settings - Fork 383
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
Automate docs generation #6188
base: develop
Are you sure you want to change the base?
Automate docs generation #6188
Conversation
3c25c1b
to
4cd77d6
Compare
@@ -87,7 +87,6 @@ public function parse_files( $files, $root ) { | |||
$out = [ | |||
'file' => $this->export_docblock( $file ), | |||
'path' => str_replace( DIRECTORY_SEPARATOR, '/', $file->getFilename() ), | |||
'root' => $root, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if this key is used anywhere.
With this change the the root
key for each file
object in the generated JSON file would no longer exist, preventing any unnecessary change to the JSON if it were generated in a different environment from where the docs command was previously run.
git config user.email "[email protected]" | ||
git config user.name "Pierre Gordon" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The github-actions
bot isn't on the CLA allowlist so I'm using myself for now to make commits.
Examples of the PRs this workflow would generate: pierlon#11, pierlon#12. |
Plugin builds for 68eb9ed are ready 🛎️!%0A- Download development build%0A- Download production build |
if: steps.changes.outputs.changed == 1 && steps.remote-branch.outputs.exists == 0 | ||
run: | | ||
git push -u origin "$HEAD_BRANCH" | ||
gh pr create --base "$BASE_BRANCH" --title "Update documentation for \`$BASE_BRANCH\` branch" --body "" --label Documentation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do the backticks not get evaluated? I guess not as seen in pierlon#12.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.
Summary
See #5520
This PR allows one to manually trigger generating the documentation for any branch (that has this workflow file) on demand. Once merged, you will be able to do so by going to the Actions page and clicking on the "Plugin Documentation" workflow on the left. You should then see a notice informing you the workflow can be manually dispatched, with a "Run workflow" button on the right of the notice text. Clicking that button reveals a dropdown that allows one to choose the branch to run the workflow from. Here's an example of such a screen:
Once the workflow run is complete a PR will be created with the updated documentation changes. If there are no changes, no PR is created.
Checklist