-
-
Notifications
You must be signed in to change notification settings - Fork 13
ci: Added git auto commit to workflow #27
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
ci: Added git auto commit to workflow #27
Conversation
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.
Thanks for the contribution!
Perhaps this should be in a separate workflow that runs only on push to main and not on pull requests?
I didn't get why we need a separate workflow for docs update due to the below concerns
Let me know your views and how to proceed. |
It will not necessarily always be possible for the github action to commit to a side branch since the branch could be in a repo that the action does not have authentication to push to. The only way to guarantee it will work is if the bot were to commit to main after the PR is merged, or alternatively the bot could open a new PR to update the style list if it has changed. An alternative approach may be to have the bot check if the I have gotten around to testing the script and there are a few things that need to be fixed for it to work.
from table2ascii import PresetStyle, table2ascii
ModuleNotFoundError: No module named 'table2ascii' I suggest this could be fixed by adding the top level of the repo to the path on the 2nd line of the Python script import os
__import__("sys").path.append(os.path.join(os.path.dirname(__file__), "..", ".."))
I suppose the branch would need to be specified. Let me know your thoughts on the different options of how this should proceed. Thanks! |
Instead, I think the top level directory of the repo should be added to (This will also make it easier to manually be run) |
Hi, I'm not able to fix the git push error yet. I'm new to git workflow, need some time to fix it. For the workflow, it would be better if the bot runs and update the Thanks! |
As far as fixing the push error, maybe you can simplify by using an existing action step such as EndBug/add-and-commit. That should handle the commiting/pushing automatically. For making it run on merge, the way to do that is with checking for push to main. Like I suggested originally, you can make a separate workflow that just has push main and not pull requests.
|
Hi @DenverCoder1, thanks for the help :) |
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.
Looks great! Thanks for the contribution 🎉
Hi @DenverCoder1, In this PR I have updated the workflow script to update the docs automatically during the run after pushing the changes as per the mentioned issue 21.