Spaces:
Running
Running
Albert Villanova del Moral
commited on
Implement Continuous Deployment to Spaces (#24)
Browse files- .github/workflows/deploy.yml +37 -0
.github/workflows/deploy.yml
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Deployment
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
push:
|
| 5 |
+
branches:
|
| 6 |
+
- main
|
| 7 |
+
workflow_dispatch:
|
| 8 |
+
|
| 9 |
+
jobs:
|
| 10 |
+
deployment:
|
| 11 |
+
runs-on: ubuntu-latest
|
| 12 |
+
steps:
|
| 13 |
+
- name: Check out
|
| 14 |
+
uses: actions/checkout@v2
|
| 15 |
+
with:
|
| 16 |
+
fetch-depth: 0
|
| 17 |
+
- name: Set up Python
|
| 18 |
+
uses: actions/setup-python@v2
|
| 19 |
+
with:
|
| 20 |
+
python-version: "3.6"
|
| 21 |
+
- name: Install dependencies
|
| 22 |
+
run: |
|
| 23 |
+
python -m pip install --upgrade pip
|
| 24 |
+
pip install -r requirements.txt
|
| 25 |
+
- name: Build metadata file
|
| 26 |
+
run: |
|
| 27 |
+
python build_metadata_file.py
|
| 28 |
+
- name: Commit metadata file
|
| 29 |
+
run: |
|
| 30 |
+
git config user.name github-actions
|
| 31 |
+
git config user.email github-actions@github.com
|
| 32 |
+
git add -f metadata_*
|
| 33 |
+
git commit -m "Add metadata file"
|
| 34 |
+
- name: Push to Hub
|
| 35 |
+
env:
|
| 36 |
+
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
| 37 |
+
run: git push --force https://albertvillanova:$HF_TOKEN@huggingface.co/spaces/huggingface/datasets-tagging main
|