File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4141 run : npm run build:github-pages
4242
4343 - name : Add .nojekyll file
44- run : touch out/.nojekyll
44+ run : |
45+ echo "Creating .nojekyll file to disable Jekyll processing"
46+ touch out/.nojekyll
47+ echo "Verifying .nojekyll file was created:"
48+ ls -la out/.nojekyll
49+
50+ - name : Debug build output
51+ run : |
52+ echo "Build output structure:"
53+ ls -la out/
54+ echo "Checking _next directory:"
55+ ls -la out/_next/
56+ echo "Checking static assets:"
57+ ls -la out/_next/static/chunks/ | head -5
4558
4659 - name : Upload artifact
4760 uses : actions/upload-pages-artifact@v3
Original file line number Diff line number Diff line change @@ -34,18 +34,20 @@ const nextConfig: NextConfig = {
3434};
3535```
3636
37- ### 2. GitHub Actions Workflow (` .github/workflows/deploy-github-pages .yml ` )
37+ ### 2. GitHub Actions Workflow (` .github/workflows/deploy.yml ` )
3838
3939Automated deployment workflow that:
40- - Triggers on pushes to ` main ` branch
40+ - Triggers on pushes to ` main ` branch and pull requests
4141- Can be manually triggered via workflow_dispatch
42- - Builds the Next.js application as static files
43- - Deploys to GitHub Pages
42+ - Builds the Next.js application as static files using ` npm run build:github-pages `
43+ - Creates ` .nojekyll ` file to disable Jekyll processing
44+ - Deploys to GitHub Pages using official GitHub Pages action
4445
45- ### 3. Additional Files
46+ ### 3. Critical Files for Deployment
4647
47- - ` .nojekyll ` : Prevents GitHub from processing the site with Jekyll
48- - ` 404.html ` : Custom 404 page (automatically generated by Next.js)
48+ - ** ` .nojekyll ` ** : Automatically created during build to prevent GitHub from processing the site with Jekyll (critical for ` _next ` directory assets)
49+ - ** ` 404.html ` ** : Custom 404 page (automatically generated by Next.js)
50+ - ** Asset files** : All CSS/JS files in ` _next/static/ ` directory with correct basePath prefixes
4951
5052## Deployment Process
5153
You can’t perform that action at this time.
0 commit comments