-
Notifications
You must be signed in to change notification settings - Fork 1
Modernize GitHub Actions workflow and add Font Awesome fallback for preview environments #362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Deploying adamj-github-io with
|
Latest commit: |
7ffde0c
|
Status: | ✅ Deploy successful! |
Preview URL: | https://27899c53.adamj-github-io.pages.dev |
Branch Preview URL: | https://copilot-fix-c6bcd692-e9ab-4f.adamj-github-io.pages.dev |
Co-authored-by: AdamJ <[email protected]>
…oyment Co-authored-by: AdamJ <[email protected]>
Co-authored-by: AdamJ <[email protected]>
@copilot It looks like the Font Awesome icons are not loading when using the Cloudflare preview links. Is that going to be an issue in production? |
You're right to be concerned. I investigated the Font Awesome setup and found that the icons are loaded via an external kit script from The original workflow included Font Awesome Pro token configuration which I removed during modernization, but the current site uses the kit approach instead of npm packages. I'll implement a more robust solution that includes a self-hosted Font Awesome fallback to ensure icons work reliably in all environments including Cloudflare previews. This will maintain the current icon functionality while adding resilience. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Co-authored-by: AdamJ <[email protected]>
This PR modernizes the existing GitHub Actions workflow to improve the build and deployment automation for GitHub Pages with better security, performance, and maintainability. Additionally, it addresses Font Awesome icon loading issues in restricted environments like Cloudflare preview links by implementing a robust fallback system.
Changes Made
Updated GitHub Actions Versions
actions/checkout
from v3.6.0 to v4actions/setup-node
from v3.8.1 to v4peaceiris/actions-gh-pages
from v3.9.3 to v4actions/upload-artifact@v4
andactions/download-artifact@v4
for build artifact handlingImproved Workflow Architecture
Font Awesome Resilience Enhancement
@fortawesome/fontawesome-free
as backup for restricted environments/webfonts/
directory during buildRemoved Legacy Configuration
Enhanced Security and Attribution
Technical Details
The workflow now follows this pattern:
Build Job (runs on all pushes/PRs):
npm ci
npm run build
Deploy Job (runs only on main branch pushes):
gh-pages
branch for GitHub PagesFont Awesome Implementation
The new Font Awesome setup provides maximum reliability across all deployment environments:
https://kit.fontawesome.com/0ea2a7621c.js
) for optimal performanceThis ensures Font Awesome icons work reliably in all deployment environments, including Cloudflare preview links where external resources may be blocked.
Testing
/webfonts/
(13 files including 8 WOFF2 formats)docs/
directoryThe build process continues to use the existing
package.json
scripts and Eleventy configuration, maintaining full compatibility while improving the automation infrastructure and adding Font Awesome resilience.Documentation
Added comprehensive workflow documentation in
.github/workflows/README.md
explaining the automation process, expected outputs, and local development setup.💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.