shunk031 commited on
Commit
81eeae3
1 Parent(s): db6eb0a

Update workflow (#2)

Browse files
.github/workflows/ci.yaml CHANGED
@@ -7,7 +7,7 @@ on:
7
  branches: [main]
8
 
9
  jobs:
10
- build_and_release:
11
  runs-on: ubuntu-latest
12
  strategy:
13
  matrix:
@@ -44,12 +44,3 @@ jobs:
44
  - name: Run tests
45
  run: |
46
  poetry run pytest --color=yes -rf
47
-
48
- - name: Push to Huggingface hub
49
- if: github.event_name == 'push' && github.ref == 'refs/heads/main'
50
- env:
51
- HF_TOKEN: ${{ secrets.HF_TOKEN }}
52
- HF_USERNAME: ${{ secrets.HF_USERNAME }}
53
- run: |
54
- git fetch --unshallow
55
- git push --force https://${HF_USERNAME}:${HF_TOKEN}@huggingface.co/datasets/${HF_USERNAME}/cocostuff main
 
7
  branches: [main]
8
 
9
  jobs:
10
+ test:
11
  runs-on: ubuntu-latest
12
  strategy:
13
  matrix:
 
44
  - name: Run tests
45
  run: |
46
  poetry run pytest --color=yes -rf
 
 
 
 
 
 
 
 
 
.github/workflows/push_to_hub.yaml ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Sync to Hugging Face Hub
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+
7
+ jobs:
8
+ push_to_hub:
9
+ runs-on: ubuntu-latest
10
+
11
+ steps:
12
+ - name: Checkout repository
13
+ uses: actions/checkout@v2
14
+
15
+ - name: Push to Huggingface hub
16
+ env:
17
+ HF_TOKEN: ${{ secrets.HF_TOKEN }}
18
+ HF_USERNAME: ${{ secrets.HF_USERNAME }}
19
+ run: |
20
+ git fetch --unshallow
21
+ git push --force https://${HF_USERNAME}:${HF_TOKEN}@huggingface.co/datasets/${HF_USERNAME}/cocostuff main