Summary
Introduce a dedicated GitHub Actions workflow for GitHub Pages to ensure clean, secure, and production-only deployments.
Problem
Currently, GitHub Pages deploys directly from the repository without a controlled workflow. This leads to:
-
Unwanted Jekyll processing
GitHub Pages runs Jekyll by default, which is unnecessary and may interfere with dynamic behavior.
-
Full repository deployment
The entire repository may be deployed instead of only the intended production output. This can:
- Expose internal or development files
- Increase deployment size
- Publish configuration or non-public assets
-
Deployment of development artifacts
Temporary files and non-production resources may be unintentionally published.
Proposed Solution
- Builds the site using the existing build system
- Publishes only the production output directory (e.g.,
dist/)
- Ensures only built site artifacts are uploaded to GitHub Pages
- Prevents deployment of unnecessary development files
Benefits
- Prevents unintended Jekyll processing
- Deploys only production-ready files
- Reduces risk of exposing internal content
- Results in smaller and cleaner deployments
- Establishes a maintainable and explicit deployment process
Summary
Introduce a dedicated GitHub Actions workflow for GitHub Pages to ensure clean, secure, and production-only deployments.
Problem
Currently, GitHub Pages deploys directly from the repository without a controlled workflow. This leads to:
Unwanted Jekyll processing
GitHub Pages runs Jekyll by default, which is unnecessary and may interfere with dynamic behavior.
Full repository deployment
The entire repository may be deployed instead of only the intended production output. This can:
Deployment of development artifacts
Temporary files and non-production resources may be unintentionally published.
Proposed Solution
dist/)Benefits