Albert Villanova del Moral commited on
Commit
ad312b0
·
1 Parent(s): 4b5f73d

Add GitHub Action to deploy to Spaces

Browse files
Files changed (1) hide show
  1. .github/workflows/deploy.yml +36 -0
.github/workflows/deploy.yml ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ - name: Set up Python
16
+ uses: actions/setup-python@v2
17
+ with:
18
+ python-version: "3.6"
19
+ - name: Install dependencies
20
+ run: |
21
+ python -m pip install --upgrade pip
22
+ pip install -r requirements.txt
23
+ - name: Build metadata file
24
+ run: |
25
+ python build_metadata_file.py
26
+ - name: Commit metadata file
27
+ run: |
28
+ # git config user.name github-actions
29
+ # git config user.email github-actions@github.com
30
+ git add metadata-*
31
+ git commit -m "Add metadata file"
32
+ - name: Push to Hub
33
+ env:
34
+ HF_TOKEN: ${{ secrets.HF_TOKEN }}
35
+ # run: git push --force https://HF_USERNAME:$HF_TOKEN@huggingface.co/spaces/huggingface/datasets-tagging main
36
+ run: git push --force https://HF_USERNAME:$HF_TOKEN@huggingface.co/spaces/albertvillanova/datasets-tagging main