Skip to content

Commit aa3bf5f

Browse files
committed
Mise à jour de la configuration pour le déploiement GitHub Pages
1 parent 85a1171 commit aa3bf5f

2 files changed

Lines changed: 19 additions & 21 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,33 @@ name: Deploy to GitHub Pages
33
on:
44
push:
55
branches: [ main ]
6-
workflow_dispatch:
76

87
jobs:
9-
build-and-deploy:
8+
deploy:
109
runs-on: ubuntu-latest
1110

1211
steps:
13-
- name: Checkout
14-
uses: actions/checkout@v4
12+
- uses: actions/checkout@v3
1513

1614
- name: Set up Node.js
17-
uses: actions/setup-node@v4
15+
uses: actions/setup-node@v3
1816
with:
19-
node-version: '20.x'
17+
node-version: '18.x'
2018
cache: 'npm'
21-
19+
2220
- name: Install dependencies
23-
run: npm ci
24-
21+
run: npm install
22+
2523
- name: Build
26-
run: |
27-
npm run build
28-
npm run export
29-
24+
run: npm run build
25+
26+
- name: Export
27+
run: npm run export
28+
3029
- name: Deploy to GitHub Pages
3130
uses: JamesIves/github-pages-deploy-action@v4
3231
with:
3332
folder: out
3433
branch: gh-pages
34+
token: ${{ secrets.GITHUB_TOKEN }}
3535
clean: true

next.config.js

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,17 @@ const isProd = process.env.NODE_ENV === 'production';
33

44
const nextConfig = {
55
output: 'export',
6-
basePath: isProd ? '' : '',
7-
assetPrefix: isProd ? 'https://lemophile.github.io/' : '',
6+
basePath: isProd ? '/piwi' : '',
7+
assetPrefix: isProd ? '/piwi/' : '',
88
images: {
99
unoptimized: true,
1010
},
1111
experimental: {
1212
// Désactiver l'optimisation des images pour l'export statique
13-
optimizePackageImports: ['framer-motion'],
14-
// Désactiver le moteur Turbopack
15-
turbo: {
16-
resolveAlias: {}
17-
}
18-
}
13+
optimizePackageImports: ['framer-motion']
14+
},
15+
// Désactiver le moteur Turbopack
16+
turbo: false
1917
};
2018

2119
module.exports = nextConfig;

0 commit comments

Comments
 (0)