Spaces:
Running
Running
Cassie Buhler commited on
Create preview.yml
Browse files
.github/workflows/preview.yml
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Preview on Hugging Face
|
| 2 |
+
on:
|
| 3 |
+
pull_request:
|
| 4 |
+
# to run this workflow manually from the Actions tab
|
| 5 |
+
workflow_dispatch:
|
| 6 |
+
|
| 7 |
+
jobs:
|
| 8 |
+
sync-to-hub:
|
| 9 |
+
runs-on: ubuntu-latest
|
| 10 |
+
steps:
|
| 11 |
+
- uses: actions/checkout@v3
|
| 12 |
+
with:
|
| 13 |
+
fetch-depth: 0
|
| 14 |
+
lfs: true
|
| 15 |
+
- name: Push to hub
|
| 16 |
+
env:
|
| 17 |
+
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
| 18 |
+
run: |
|
| 19 |
+
git remote add preview "https://cassiebuhler:${HF_TOKEN}@huggingface.co/spaces/boettiger-lab/preview-tpl"
|
| 20 |
+
git push -f --set-upstream preview HEAD:main
|
| 21 |
+
git remote rm preview
|