Skip to content

Add GitHub Actions workflows for GitHub Pages and Firebase Hosting deployment#16

Open
Copilot wants to merge 7 commits intogh-pagesfrom
copilot/add-github-actions-deploy
Open

Add GitHub Actions workflows for GitHub Pages and Firebase Hosting deployment#16
Copilot wants to merge 7 commits intogh-pagesfrom
copilot/add-github-actions-deploy

Conversation

Copy link
Contributor

Copilot AI commented Nov 11, 2025

GitHub Actions deployment workflows completed:

  • Create .github/workflows directory structure
  • Create GitHub Pages deployment workflow
  • Create Firebase Hosting deployment workflow
  • Create Firebase configuration file (firebase.json)
  • Update .gitignore to exclude Firebase cache
  • Fix security issue: Add explicit permissions to Firebase workflow
  • Remove DEPLOYMENT.md file per user request
  • Change workflows to trigger on gh-pages branch
  • Fix Node.js compatibility with legacy dependencies
  • Fix bower installation method
  • Pin Firebase action to stable version
  • Fix Firebase config to include bower_components

Created Files:

  • .github/workflows/deploy-github-pages.yml - Workflow for GitHub Pages deployment
  • .github/workflows/deploy-firebase.yml - Workflow for Firebase Hosting deployment
  • firebase.json - Firebase Hosting configuration
  • Updated .gitignore to exclude Firebase cache files

Security:

  • All workflows use explicit permissions blocks
  • CodeQL security scan passed with no alerts

Compatibility:

  • Using Node.js 16 for compatibility with legacy gulp dependencies
  • Using npx bower instead of global installation

Secrets Required:

  1. For Firebase: FIREBASE_SERVICE_ACCOUNT and FIREBASE_PROJECT_ID
  2. For GitHub Pages: No secrets needed (uses built-in GITHUB_TOKEN)

Both workflows trigger on push to gh-pages branch and can be manually triggered via workflow_dispatch.

Original prompt

create github actions that deploy to github-pages and to firebase-hosting. let me know what secrets to add and how to get them


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits November 11, 2025 04:03
…ployment

Co-authored-by: ProLoser <67395+ProLoser@users.noreply.github.com>
Co-authored-by: ProLoser <67395+ProLoser@users.noreply.github.com>
Copilot AI changed the title [WIP] Add GitHub Actions for deploying to GitHub Pages and Firebase Hosting Add GitHub Actions workflows for GitHub Pages and Firebase Hosting deployment Nov 11, 2025
Copilot AI requested a review from ProLoser November 11, 2025 04:07
@ProLoser
Copy link
Owner

@copilot i don't want your markdownf ile

Co-authored-by: ProLoser <67395+ProLoser@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Nov 11, 2025

@copilot i don't want your markdownf ile

Removed in 7f2bab3

@ProLoser ProLoser marked this pull request as ready for review November 11, 2025 17:44
@ProLoser
Copy link
Owner

ProLoser commented Feb 1, 2026

@copilot use the gh-pages branch not master.

…master

Co-authored-by: ProLoser <67395+ProLoser@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 1, 2026

@copilot use the gh-pages branch not master.

Updated both workflows to trigger on gh-pages branch in 778e3b3

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds automated deployment workflows for GitHub Pages and Firebase Hosting, enabling continuous deployment on pushes to the master branch. The implementation sets up build pipelines that compile SCSS to CSS and JSX to JavaScript using gulp, then deploy the compiled assets.

Changes:

  • Added GitHub Actions workflows for automated deployment to GitHub Pages and Firebase Hosting
  • Configured Firebase hosting with ignore patterns for source files
  • Updated .gitignore to exclude Firebase-specific files

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 11 comments.

File Description
.github/workflows/deploy-github-pages.yml GitHub Pages deployment workflow with build and deploy jobs
.github/workflows/deploy-firebase.yml Firebase Hosting deployment workflow with build and deploy steps
firebase.json Firebase hosting configuration with public directory and ignore patterns
.gitignore Excludes Firebase cache and config files

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 28 to 30
npm install -g bower
bower install --allow-root

Copy link

Copilot AI Feb 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow installs bower globally using npm install -g, which may not be necessary and could lead to permissions issues. Since bower is being called with npx or the full path isn't needed, consider:

  1. Installing bower as a local devDependency in package.json
  2. Using npx bower install instead of installing globally

This approach is more consistent with modern npm practices and avoids potential permission issues.

Suggested change
npm install -g bower
bower install --allow-root
npx bower install --allow-root

Copilot uses AI. Check for mistakes.
npx gulp react

- name: Deploy to Firebase
uses: FirebaseExtended/action-hosting-deploy@v0
Copy link

Copilot AI Feb 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Firebase deployment action uses version @v0 which is not a stable release tag. Using major version tags like @v0 can lead to unexpected breaking changes when the action is updated.

Consider pinning to a specific stable version or using @v0 with a commit SHA for better reproducibility and security. Check the action's releases at https://github.com/FirebaseExtended/action-hosting-deploy/releases for available stable versions.

Suggested change
uses: FirebaseExtended/action-hosting-deploy@v0
uses: FirebaseExtended/action-hosting-deploy@v0.6.4

Copilot uses AI. Check for mistakes.
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
Copy link

Copilot AI Feb 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow configuration enables npm caching with 'cache: npm', but the repository doesn't appear to have a package-lock.json file. The npm cache feature requires a lock file to function properly.

Without a lock file:

  1. The cache won't be created or restored effectively
  2. Builds may use different dependency versions between runs
  3. Build reproducibility is not guaranteed

Consider either:

  1. Generating and committing a package-lock.json file (run npm install locally)
  2. Removing the cache configuration if not needed
  3. Using cache: 'npm' only after ensuring package-lock.json is present

This won't cause immediate failures but affects build performance and reproducibility.

Suggested change
cache: 'npm'

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,25 @@
{
"hosting": {
"public": ".",
Copy link

Copilot AI Feb 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Firebase configuration sets "public": "." which deploys the entire repository root. While the ignore patterns help filter out source files, this approach has issues:

  1. It's error-prone as you must remember to add new source file patterns to the ignore list
  2. The deployed site still includes all necessary runtime files mixed with the source repository structure
  3. It's inconsistent with Firebase Hosting best practices, which recommend a dedicated public/build directory

Consider changing this to a dedicated output directory (e.g., "public": "dist" or "public": "build") and updating the build process to copy necessary runtime files there. This provides better separation between source and deployment artifacts.

Suggested change
"public": ".",
"public": "dist",

Copilot uses AI. Check for mistakes.
firebase.json Outdated
"package-lock.json",
"bower.json",
"config.rb",
".imdone"
Copy link

Copilot AI Feb 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ignore patterns in firebase.json are missing some common build tool and configuration files that should not be deployed:

  • .github/ directory (contains workflow files)
  • README.md (documentation file)
  • LICENSE file
  • config.rb (Compass/Sass configuration)
  • cache.manifest

While the rewrite rule to /index.html will handle routing, these files could still be accessible if users know the exact paths. Consider adding these patterns to the ignore list for a cleaner deployment.

Suggested change
".imdone"
".imdone",
"**/.github/**",
"README.md",
"LICENSE",
"cache.manifest"

Copilot uses AI. Check for mistakes.
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
Copy link

Copilot AI Feb 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflows specify Node.js version 18, but this project uses very old dependencies (gulp 3.8.7, gulp-sass 0.7.3, React 0.12.2, etc.) that may not be compatible with Node.js 18. These older gulp and gulp-sass versions were designed for Node.js 0.10-6.x era.

Consider either:

  1. Testing with Node.js 14 or 16 which have better compatibility with these legacy dependencies
  2. Updating the build tools and dependencies to modern versions if the project allows

This is a critical issue because the build will likely fail with Node.js 18, causing deployment failures.

Suggested change
node-version: '18'
node-version: '16'

Copilot uses AI. Check for mistakes.
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
Copy link

Copilot AI Feb 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow specifies Node.js version 18, but this project uses very old dependencies (gulp 3.8.7, gulp-sass 0.7.3, React 0.12.2, etc.) that may not be compatible with Node.js 18. These older gulp and gulp-sass versions were designed for Node.js 0.10-6.x era.

Consider either:

  1. Testing with Node.js 14 or 16 which have better compatibility with these legacy dependencies
  2. Updating the build tools and dependencies to modern versions if the project allows

This is a critical issue because the build will likely fail with Node.js 18, causing deployment failures.

Suggested change
node-version: '18'
node-version: '16'

Copilot uses AI. Check for mistakes.
firebase.json Outdated
"firebase.json",
"**/.*",
"**/node_modules/**",
"**/bower_components/**",
Copy link

Copilot AI Feb 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The firebase.json configuration excludes "/bower_components/" but the application's index.html references files from bower_components directory (lines 7-12 of index.html). This will cause the deployed site to fail as critical JavaScript and CSS dependencies won't be available.

You need to either:

  1. Remove the bower_components exclusion from the ignore list
  2. Copy or bundle the required bower dependencies into the public directory during the build step
  3. Use a CDN for these dependencies and update index.html accordingly

This is a critical issue that will prevent the Firebase-hosted site from functioning.

Suggested change
"**/bower_components/**",

Copilot uses AI. Check for mistakes.
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
Copy link

Copilot AI Feb 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow configuration enables npm caching with 'cache: npm', but the repository doesn't appear to have a package-lock.json file. The npm cache feature requires a lock file to function properly.

Without a lock file:

  1. The cache won't be created or restored effectively
  2. Builds may use different dependency versions between runs
  3. Build reproducibility is not guaranteed

Consider either:

  1. Generating and committing a package-lock.json file (run npm install locally)
  2. Removing the cache configuration if not needed
  3. Using cache: 'npm' only after ensuring package-lock.json is present

This won't cause immediate failures but affects build performance and reproducibility.

Suggested change
cache: 'npm'

Copilot uses AI. Check for mistakes.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot please address this, perhaps yarn is a better value? if not applicable please use suggestion

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the npm cache configuration from both workflows in 07a0031. Since there's no package-lock.json or yarn.lock file, caching isn't applicable. The workflows will still work correctly without it.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
- Change Node.js version from 18 to 16 for compatibility with legacy gulp dependencies
- Use npx bower instead of global bower installation
- Pin Firebase action to stable version v0.9.0
- Remove bower_components from Firebase ignore list (required by index.html)
- Add additional ignore patterns (README, LICENSE, .github, cache.manifest)

Co-authored-by: ProLoser <67395+ProLoser@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants