-
Hi! Unfortunately, I am pretty lost when it comes to GitHub Actions. I would like to build JSDoc when my repo is pushed to. Is this possible with GitHub Actions, or should I be looking for an alternative? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Yes, GitHub Actions essentially allows you to do anything you can do in a Docker container, which is nearly limitless. Since GitHub Actions are time-limited though, you would need to build the Action to build your JSDoc and then upload it someplace else to be downloaded or hosted before the Action completes. I hope that helps! Let us know if you have any other questions. |
Beta Was this translation helpful? Give feedback.
-
So … there is no way to run for example
to start the jsdoc generation and add them to the current repo? You can only imagine to handle that with a second target (like github pages), right? |
Beta Was this translation helpful? Give feedback.
-
You can do what you’re describing, yes. You could create a workflow to monitor for pushes to your default branch, build the documentation from that change, then push those new docs back to the default branch, if you chose. Actions specifically prevents workflows from triggering other workflows, so this is safe from an infinite worker loop. Personally, I use a workflow for my projects to push generated documentation to GitHub Pages because I find having the docs hosted on the web more useful than only in the repository. But it doesn’t have to be done that way. As I said, Actions is pretty wide open on what you can do with it. |
Beta Was this translation helpful? Give feedback.
Yes, GitHub Actions essentially allows you to do anything you can do in a Docker container, which is nearly limitless. Since GitHub Actions are time-limited though, you would need to build the Action to build your JSDoc and then upload it someplace else to be downloaded or hosted before the Action completes.
I hope that helps! Let us know if you have any other questions.