muddasser commited on
Commit
751cd90
·
unverified ·
1 Parent(s): 6cf810e

Update deploy.yml

Browse files
Files changed (1) hide show
  1. .github/workflows/deploy.yml +1 -13
.github/workflows/deploy.yml CHANGED
@@ -1,3 +1,4 @@
 
1
  name: CICD Prophet
2
 
3
  on:
@@ -10,14 +11,11 @@ jobs:
10
  runs-on: ubuntu-latest
11
  steps:
12
  - uses: actions/checkout@v3
13
-
14
  - uses: actions/setup-python@v4
15
  with:
16
  python-version: "3.10"
17
-
18
  - name: Install
19
  run: pip install -r requirements.txt && pip install pytest
20
-
21
  - name: Test
22
  run: pytest tests/ -v
23
 
@@ -27,12 +25,10 @@ jobs:
27
  if: github.ref == 'refs/heads/main'
28
  steps:
29
  - uses: actions/checkout@v3
30
-
31
  - name: Git Config
32
  run: |
33
  git config --global user.email "ci@github.com"
34
  git config --global user.name "GitHub CI"
35
-
36
  - name: Push to HF
37
  env:
38
  HF_TOKEN: ${{ secrets.HF_TOKEN }}
@@ -40,11 +36,3 @@ jobs:
40
  git remote add hf https://muddasser:${HF_TOKEN}@huggingface.co/spaces/muddasser/ci_cd_prophet
41
  git push hf main --force
42
  ```
43
-
44
- ---
45
-
46
- ### Key Fix
47
- ```
48
- Split the long command into
49
- two separate lines under run: |
50
- instead of one long line
 
1
+ ```yaml
2
  name: CICD Prophet
3
 
4
  on:
 
11
  runs-on: ubuntu-latest
12
  steps:
13
  - uses: actions/checkout@v3
 
14
  - uses: actions/setup-python@v4
15
  with:
16
  python-version: "3.10"
 
17
  - name: Install
18
  run: pip install -r requirements.txt && pip install pytest
 
19
  - name: Test
20
  run: pytest tests/ -v
21
 
 
25
  if: github.ref == 'refs/heads/main'
26
  steps:
27
  - uses: actions/checkout@v3
 
28
  - name: Git Config
29
  run: |
30
  git config --global user.email "ci@github.com"
31
  git config --global user.name "GitHub CI"
 
32
  - name: Push to HF
33
  env:
34
  HF_TOKEN: ${{ secrets.HF_TOKEN }}
 
36
  git remote add hf https://muddasser:${HF_TOKEN}@huggingface.co/spaces/muddasser/ci_cd_prophet
37
  git push hf main --force
38
  ```