-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
114a031
commit 934f7f5
Showing
1 changed file
with
20 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,32 @@ | ||
name: A workflow for deploy the science website | ||
name: Deploy to GitHub Pages | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
branches: | ||
- main # Remplacez par la branche à partir de laquelle vous souhaitez déployer | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest # Le workflow sera exécuté sur une machine virtuelle Ubuntu | ||
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout du code | ||
uses: actions/checkout@v4 # Cette étape récupère votre code source | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Node.js (si nécessaire) | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: "14" | ||
|
||
- name: Install dependencies | ||
run: npm install # Si vous utilisez npm ou yarn pour gérer les dépendances | ||
|
||
- name: Configurer Git | ||
run: | | ||
git config --global user.name "github-actions" | ||
git config --global user.email "[email protected]" | ||
- name: Build | ||
run: npm run build # Commande pour générer les fichiers statiques de votre site | ||
|
||
- name: Déployer sur GitHub Pages | ||
uses: JamesIves/github-pages-deploy-action@v4.1.0 # Utilisation de l'action de déploiement GitHub Pages | ||
- name: Deploy to GitHub Pages | ||
uses: jamesives/github-pages-deploy-action@v4 # Utilisation de la version v4 stable | ||
with: | ||
branch: gh-pages # La branche sur laquelle déployer | ||
folder: . # Le dossier contenant vos fichiers (ici, la racine du dépôt) | ||
branch: gh-pages # Branche sur laquelle déployer | ||
folder: build # Dossier contenant les fichiers à déployer (à ajuster selon votre configuration) | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |