File tree Expand file tree Collapse file tree 4 files changed +380
-6
lines changed
Expand file tree Collapse file tree 4 files changed +380
-6
lines changed Original file line number Diff line number Diff line change @@ -3,28 +3,36 @@ name: Deploy React App to GitHub Pages
33on :
44 push :
55 branches :
6- - main
6+ - main # à chaque push sur main, le workflow se déclenche
77
88jobs :
99 build-and-deploy :
1010 runs-on : ubuntu-latest
11+
1112 steps :
13+ # 1️⃣ Récupérer le code
1214 - name : Checkout repository
1315 uses : actions/checkout@v3
1416
17+ # 2️⃣ Installer Node.js
1518 - name : Setup Node.js
1619 uses : actions/setup-node@v3
1720 with :
18- node-version : ' 19 '
21+ node-version : ' 18 ' # tu peux changer selon ta version locale
1922
23+ # 3️⃣ Installer les dépendances
2024 - name : Install dependencies
2125 run : npm install
2226
27+ # 4️⃣ Build l'application
2328 - name : Build
2429 run : npm run build
2530
31+ # 5️⃣ Déployer sur GitHub Pages
2632 - name : Deploy
2733 uses : peaceiris/actions-gh-pages@v3
2834 with :
29- github_token : ${{ secrets.GITHUB_TOKEN }}
30- publish_dir : ./build
35+ personal_token : ${{ secrets.GH_PAT }} # PAT que tu crées dans GitHub secrets
36+ publish_dir : ./build # dossier React build
37+ user_name : " eren-the-coder"
38+
Original file line number Diff line number Diff line change @@ -22,3 +22,4 @@ dist-ssr
2222* .njsproj
2323* .sln
2424* .sw ?
25+ automatisation.md
You can’t perform that action at this time.
0 commit comments