How to setup github actions to run my python script on schedule? #26539
-
I have a Github repo which analyzes data of COVID-19 cases from an api which updates everyday. I have run.py script which clones the data but I don’t know how to setup github actions to run the script daily(automaticaly) so that data gets updated daily. And one more thing I also want to export my Analysis.ipnb as index.html daily at the same time. I don’t have any idea how to setup github actions to achive above tasks |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Hi @piyushke , Thank you for being here! To answer your query:
Thanks. |
Beta Was this translation helpful? Give feedback.
-
Hi @piyushke, May I know where is you store the run.py file? Is it under github/workflow folder? |
Beta Was this translation helpful? Give feedback.
-
you can write a path
|
Beta Was this translation helpful? Give feedback.
Hi @piyushke ,
Thank you for being here! To answer your query:
You need to create a workflow yaml, doc here: https://help.github.com/en/actions/configuring-and-managing-workflows/configuring-a-workflow#creating-a-workflow-file
In the yaml, set ‘schedule’ event. Details here. code sample as below: