Tbruand
commited on
Commit
·
b21d1e3
1
Parent(s):
4e33256
feat(cd): ajout du workflow GitHub Actions pour déploiement auto sur Hugging Face après validation CI
Browse files- .github/workflows/cd.yml +26 -0
.github/workflows/cd.yml
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|