refactor(ci-cd): fusion dev dans main avec nouveau workflow unifié
Browse files- .github/workflows/cd.yml +0 -26
- .github/workflows/ci.yml +0 -31
.github/workflows/cd.yml
DELETED
@@ -1,26 +0,0 @@
|
|
1 |
-
name: CD - Déploiement Hugging Face Space
|
2 |
-
|
3 |
-
on:
|
4 |
-
push:
|
5 |
-
branches:
|
6 |
-
- main # 🛑 Le CD ne se déclenche que sur la branche main
|
7 |
-
workflow_dispatch: # 🔘 Option pour lancer manuellement le CD
|
8 |
-
|
9 |
-
jobs:
|
10 |
-
deploy:
|
11 |
-
needs: ci # ➕ Attend que le job CI passe avant de lancer le CD
|
12 |
-
runs-on: ubuntu-latest
|
13 |
-
|
14 |
-
steps:
|
15 |
-
- name: Checkout repository
|
16 |
-
uses: actions/checkout@v3
|
17 |
-
with:
|
18 |
-
fetch-depth: 0
|
19 |
-
lfs: true
|
20 |
-
|
21 |
-
- name: Push to Hugging Face Space
|
22 |
-
env:
|
23 |
-
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
24 |
-
run: |
|
25 |
-
git remote add space https://Tbruand:$HF_TOKEN@huggingface.co/spaces/Tbruand/toxicheck || true
|
26 |
-
git push space main --force
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.github/workflows/ci.yml
DELETED
@@ -1,31 +0,0 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
name: CI
|
4 |
-
|
5 |
-
on:
|
6 |
-
push:
|
7 |
-
branches: [main, dev]
|
8 |
-
pull_request:
|
9 |
-
branches: [main, dev]
|
10 |
-
|
11 |
-
jobs:
|
12 |
-
test:
|
13 |
-
runs-on: ubuntu-latest
|
14 |
-
|
15 |
-
steps:
|
16 |
-
- name: Checkout code
|
17 |
-
uses: actions/checkout@v3
|
18 |
-
|
19 |
-
- name: Set up Python
|
20 |
-
uses: actions/setup-python@v4
|
21 |
-
with:
|
22 |
-
python-version: '3.10'
|
23 |
-
|
24 |
-
- name: Install dependencies
|
25 |
-
run: |
|
26 |
-
python -m pip install --upgrade pip
|
27 |
-
pip install -r requirements.txt
|
28 |
-
|
29 |
-
- name: Run tests
|
30 |
-
run: |
|
31 |
-
pytest
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|