Error: Creating Pages deployment failed
Error: HttpError: Not Found
Ensure GitHub Pages has been enabled:
https://github.com/ITIF-Syuhada/pemrograman-dasar/settings/pages
-
Buka halaman settings:
https://github.com/ITIF-Syuhada/pemrograman-dasar/settings/pages -
Klik pada "Source" dropdown
-
Pilih: "GitHub Actions"
- ❌ JANGAN pilih "Deploy from a branch"
- ✅ PILIH "GitHub Actions"
-
Klik Save
-
Buka Actions settings:
https://github.com/ITIF-Syuhada/pemrograman-dasar/settings/actions -
Scroll ke "Workflow permissions"
-
Pastikan dipilih:
- ✅ Read and write permissions
- ✅ Allow GitHub Actions to create and approve pull requests
-
Klik Save
-
Buka Actions tab:
https://github.com/ITIF-Syuhada/pemrograman-dasar/actions -
Klik workflow yang failed
-
Klik "Re-run all jobs"
-
Wait for deployment to complete (~2-3 minutes)
Setelah workflow sukses, site akan live di:
https://itif-syuhada.github.io/pemrograman-dasar
Pastikan semua sudah ✅:
- GitHub Pages Source = "GitHub Actions"
- Workflow permissions = "Read and write"
- Workflow sudah di-rerun
- Build step ✅ success (hijau)
- Deploy step ✅ success (hijau)
- Site bisa diakses di URL
-
Check Build Logs:
- Actions → Pilih workflow run → Klik "build" job
- Cari error message di console
-
Common Issues:
- ❌
npm cifailed → Check package-lock.json - ❌
npm run buildfailed → Test locally dulu - ❌ Permission denied → Check repository permissions
- ❌
-
Test Local Build:
npm ci npm run build npm run preview
Jika local build sukses, berarti code OK.
Jika GitHub Actions berhasil tapi https://itif-syuhada.github.io/pemrograman-dasar/ masih 404:
- Go to: https://github.com/ITIF-Syuhada/pemrograman-dasar/settings/pages
- Source: GitHub Actions ✅
- Custom domain: Empty (jangan isi)
- Go to: https://github.com/ITIF-Syuhada/pemrograman-dasar/settings/environments
- Environment "github-pages" harus ada
- Protection rules: None (untuk testing)
- GitHub Pages butuh waktu untuk propagate
- Coba akses lagi setelah 10 menit
Pastikan di dist/index.html ada base path /pemrograman-dasar/:
<script src="/pemrograman-dasar/assets/index-xxx.js"></script>
<link href="/pemrograman-dasar/assets/index-xxx.css" rel="stylesheet">- Go to Actions → Pilih workflow → "Re-run all jobs"
- Atau push commit kosong:
git commit --allow-empty -m "force redeploy" && git push
Jika masih ada masalah:
- Check workflow file di
.github/workflows/deploy.yml - Read error logs di GitHub Actions
- Create issue di repository dengan:
- Screenshot error
- Link ke failed workflow
- Langkah yang sudah dicoba
Jika GitHub Actions masih bermasalah, bisa deploy manual:
# Install gh-pages
npm install -D gh-pages
# Add script to package.json
"deploy": "npm run build && gh-pages -d dist"
# Deploy!
npm run deployLalu di GitHub Settings → Pages:
- Source: Deploy from a branch
- Branch: gh-pages / (root)
Happy deploying! 🎉