Skip to content

feat: add GitHub Actions workflow for automatic GitHub Pages deployment#97

Merged
NotYuSheng merged 3 commits intomainfrom
feature/add-github-pages-auto-deployment
Aug 17, 2025
Merged

feat: add GitHub Actions workflow for automatic GitHub Pages deployment#97
NotYuSheng merged 3 commits intomainfrom
feature/add-github-pages-auto-deployment

Conversation

@NotYuSheng
Copy link
Copy Markdown
Owner

Summary

Implement automatic GitHub Pages deployment using GitHub Actions to eliminate manual deployment steps and ensure the live site stays synchronized with the main branch.

Changes Made

  • New File: .github/workflows/deploy-gh-pages.yml
    • Automatically deploys React frontend to GitHub Pages on every push to main branch
    • Supports manual triggering via workflow_dispatch for on-demand deployments
    • Uses Node.js 18 with npm caching for optimal build performance
    • Includes proper permissions and security configurations for Pages deployment

Technical Implementation

  • Trigger Events:

    • Automatic: Every push to main branch
    • Manual: Can be triggered from GitHub Actions tab
  • Build Process:

    • Installs dependencies with npm ci for consistent builds
    • Builds React app using npm run build
    • Deploys build output from frontend/build directory
  • Security & Performance:

    • Uses latest GitHub Actions with proper permissions
    • Implements concurrency controls to prevent conflicting deployments
    • Includes npm caching to speed up builds

Configuration Required

After merging this PR, configure GitHub Pages in repository settings:

  1. Go to Settings → Pages
  2. Set Source to "GitHub Actions" (not "Deploy from a branch")
  3. The workflow will automatically deploy on the next push to main

Benefits

  • Automatic Updates: GitHub Pages updates automatically when main branch changes
  • No Manual Steps: Eliminates need to manually run npm run deploy
  • Consistent Deployments: Same build environment every time
  • Fast Builds: npm caching reduces build times
  • Manual Override: Can trigger deployments manually when needed

Test Plan

  • Workflow file syntax validated
  • Proper permissions configured for Pages deployment
  • Build steps tested with current frontend setup
  • Manual trigger capability included

Deployment URL

Once configured, the site will be available at: https://notyusheng.github.io/MeetMemo/

🤖 Generated with Claude Code

- Add deploy-gh-pages.yml workflow to automatically deploy frontend to GitHub Pages
- Triggers on every push to main branch and can be manually triggered
- Uses Node.js 18 with npm caching for optimal build performance
- Deploys React build output from frontend/build directory
- Includes proper permissions for Pages deployment and security

This enables automatic deployment whenever main branch is updated, eliminating
the need for manual deployment steps.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Note

Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported.

@NotYuSheng NotYuSheng merged commit 85036b5 into main Aug 17, 2025
@NotYuSheng NotYuSheng deleted the feature/add-github-pages-auto-deployment branch August 17, 2025 09:44
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.

1 participant