Skip to content

Instantly share code, notes, and snippets.

@ohidurbappy
Created July 17, 2020 18:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ohidurbappy/d2047315ef82e055881755a5b7d90580 to your computer and use it in GitHub Desktop.
Save ohidurbappy/d2047315ef82e055881755a5b7d90580 to your computer and use it in GitHub Desktop.
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 7
In the yaml, set ‘schedule’ event. Details here 7. code sample as below:
name: py
on:
schedule:
- cron: “0 0 * * *” #runs at 00:00 UTC everyday
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout repo content
uses: actions/checkout@v2 # checkout the repository content to github runner.
- name: setup python
uses: actions/setup-python@v2
with:
python-version: 3.8 #install the python needed
- name: execute py script # run the run.py to get the latest data
run: |
python run.py
env:
key: ${{ secrets.key }} # if run.py requires passwords..etc, set it as secrets
- name: export index
.... # use crosponding script or actions to help export.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment