Skip to content

Commit

Permalink
- [GitHub Actions]: Wait for 10 seconds before restarting the Hugging…
Browse files Browse the repository at this point in the history
… Face Space to allow the new version to become available
  • Loading branch information
peterschmidt85 committed Aug 16, 2023
1 parent 8f70cb3 commit 2385a36
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ jobs:
steps:
- name: Restart the `dstack-stgn` Space
run: |
echo "Waiting for 10 seconds for the new version to become available..."
sleep 10
VERSION=$((${{ github.run_number }} + 150))
pip install huggingface_hub
python -c "from huggingface_hub import HfApi; hf_api = HfApi(); hf_api.add_space_secret('dstackai/dstack-stgn', 'DSTACK_VERSION', '$VERSION'); hf_api.pause_space('dstackai/dstack-stgn'); hf_api.restart_space('dstackai/dstack-stgn');"
Expand Down

0 comments on commit 2385a36

Please sign in to comment.