name: Restart Hugging Face space | |
on: | |
schedule: | |
- cron: '0 11 * * 1-5' | |
# This runs at 11:00 AM UTC (7:00 AM EST) each weekday. | |
# * is a special character in YAML so you have to quote this string | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout repo content | |
uses: actions/checkout@v2 # checkout the repository content | |
- name: setup python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' # install the python version needed | |
- name: install python packages | |
run: | | |
python -m pip install --upgrade pip | |
pip install --upgrade huggingface_hub | |
- name: execute py script # run .py | |
env: | |
HF_TOKEN: ${{ secrets.HF_TOKEN }} | |
run: python restart.py |