Skip to content

Commit 5a59e47

Browse files
Ajouter le déploiement automatique GitHub Pages
- Créé le workflow GitHub Actions pour déployer automatiquement - Ajouté le fichier CNAME pour le domaine GitHub Pages - Le site sera déployé à chaque push sur la branche main
1 parent c26dcc8 commit 5a59e47

2 files changed

Lines changed: 38 additions & 0 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
deploy:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: '18'
21+
cache: 'npm'
22+
23+
- name: Install dependencies
24+
run: |
25+
npm ci
26+
27+
- name: Build website
28+
run: |
29+
echo "Website is already built (static HTML/CSS/JS)"
30+
31+
- name: Deploy to GitHub Pages
32+
uses: peaceiris/actions-gh-pages@v3
33+
if: github.ref == 'refs/heads/main'
34+
with:
35+
github_token: ${{ secrets.GITHUB_TOKEN }}
36+
publish_dir: ./website
37+
force_orphan: true

website/CNAME

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
michaelgermini.github.io

0 commit comments

Comments
 (0)