jvroo commited on
Commit
599d3e4
·
2 Parent(s): 725e160eb6b157

Merge remote-tracking branch 'refs/remotes/origin/main'

Browse files
Files changed (1) hide show
  1. .github/workflows/main.yml +13 -7
.github/workflows/main.yml CHANGED
@@ -1,14 +1,16 @@
1
- name: Sync to Hugging Face hub
 
2
  on:
3
  push:
4
  branches: [main]
5
 
6
- # to run this workflow manually from the Actions tab
7
  workflow_dispatch:
8
 
9
  jobs:
10
  sync-to-hub:
11
  runs-on: ubuntu-latest
 
12
  steps:
13
  - name: Checkout code
14
  uses: actions/checkout@v3
@@ -24,20 +26,24 @@ jobs:
24
  pip install pytest
25
 
26
  - name: Run tests
27
- run: |
28
- pytest
29
- - uses: actions/checkout@v2
 
30
  with:
31
  fetch-depth: 0
 
32
  - name: Add remote
33
  env:
34
  CaseStudy1: ${{ secrets.CaseStudy1 }}
35
  run: git remote add space https://kroohaniwpi:$CaseStudy1@huggingface.co/spaces/ML-OPS-Grp11/CaseStudy1
 
36
  - name: Push to hub
37
  env:
38
  CaseStudy1: ${{ secrets.CaseStudy1 }}
39
  run: git push --force https://kroohaniwpi:$CaseStudy1@huggingface.co/spaces/ML-OPS-Grp11/CaseStudy1
40
- notify:
 
41
  runs-on: ubuntu-latest
42
 
43
  steps:
@@ -47,4 +53,4 @@ notify:
47
  run: |
48
  curl -X POST -H "Content-Type: application/json" \
49
  -d "{\"content\": \"A new commit was pushed to the main branch by $GITHUB_ACTOR. 😄 CS553_CaseStudy_Group 11 rock!\"}" \
50
- $DISCORD_WEBHOOK_URL
 
1
+ name: Sync to Hugging Face Hub
2
+
3
  on:
4
  push:
5
  branches: [main]
6
 
7
+ # To run this workflow manually from the Actions tab
8
  workflow_dispatch:
9
 
10
  jobs:
11
  sync-to-hub:
12
  runs-on: ubuntu-latest
13
+
14
  steps:
15
  - name: Checkout code
16
  uses: actions/checkout@v3
 
26
  pip install pytest
27
 
28
  - name: Run tests
29
+ run: pytest
30
+
31
+ - name: Checkout for Hugging Face push
32
+ uses: actions/checkout@v2
33
  with:
34
  fetch-depth: 0
35
+
36
  - name: Add remote
37
  env:
38
  CaseStudy1: ${{ secrets.CaseStudy1 }}
39
  run: git remote add space https://kroohaniwpi:$CaseStudy1@huggingface.co/spaces/ML-OPS-Grp11/CaseStudy1
40
+
41
  - name: Push to hub
42
  env:
43
  CaseStudy1: ${{ secrets.CaseStudy1 }}
44
  run: git push --force https://kroohaniwpi:$CaseStudy1@huggingface.co/spaces/ML-OPS-Grp11/CaseStudy1
45
+
46
+ notify:
47
  runs-on: ubuntu-latest
48
 
49
  steps:
 
53
  run: |
54
  curl -X POST -H "Content-Type: application/json" \
55
  -d "{\"content\": \"A new commit was pushed to the main branch by $GITHUB_ACTOR. 😄 CS553_CaseStudy_Group 11 rock!\"}" \
56
+ $DISCORD_WEBHOOK_URL