github-pages
github-pages copied to clipboard
Add Deno support to GitHub Pages template
Add Deno support to GitHub Pages template
This pull request enhances the existing Astro GitHub Pages template by adding first-class support for building under Deno, in line with the upstream changes in [withastro/action#77](https://github.com/withastro/action/pull/77).
📝 What’s Changed
- Documentation
- Added a “🔧 Enabling Deno Support” section with:
- Add
deno.jsonconfiguration - Explanation of the Deno task setup & build flow
- Updated the project structure diagram to surface
deno.jsonas an optional root file.
- Add
- Deno Configuration (
deno.json)
- Introduced a minimal example that:
- Enables Deno’s Node-builtins compatibility
- Defines a
setuptask (caching) and abuildtask (npm:astro buildvia Deno’s loader)
- Defines a
- Enables Deno’s Node-builtins compatibility
- GitHub Actions Workflow
🎯 Motivation
- Leverage the new Deno support in
withastro/actionso that users who prefer Deno can build & deploy their Astro sites without installing Node.
- Keep the Node-first flow fully supported and unchanged for existing users.
🔗 References
- Upstream Deno support in action: https://github.com/withastro/action/pull/77
- Deployment guide: https://docs.astro.build/en/guides/deploy/github/
✅ Checklist
- [ ] README updated with clear Deno instructions
- [ ] Workflow file updated and tested on a sample Deno repo
- [ ] Backward compatibility verified for Node-only projects