Skip to content

feat: Add automated production deployment workflow - #484

Merged
RahulKanduri merged 1 commit into
masterfrom
feature/add-deployment-workflow
Jul 20, 2026
Merged

feat: Add automated production deployment workflow#484
RahulKanduri merged 1 commit into
masterfrom
feature/add-deployment-workflow

Conversation

@RahulKanduri

Copy link
Copy Markdown
Collaborator

Summary

Adds a GitHub Actions workflow for automated deployment to the production server.

Changes

  • New workflow file: .github/workflows/deploy-production.yml
  • Automated deployment on push to master branch
  • Manual deployment trigger via workflow_dispatch
  • Generic naming (no specific provider mentions for security)

Workflow Features

Build on GitHub Runner

  • Installs dependencies with npm ci
  • Builds library with npm run build
  • Builds Storybook with npm run build-storybook

Secure Deployment

  • Uses SSH key authentication (stored in GitHub Secrets)
  • Rsyncs built files to production server
  • Excludes unnecessary files (.git, logs, coverage, etc.)
  • Cleans up SSH keys after deployment

Process Management

  • Automatically restarts PM2 storybook process
  • Displays PM2 status after restart
  • Logs deployment timestamp

Required GitHub Secrets

After merging, add these secrets in repository Settings → Secrets and variables → Actions:

  • PRODUCTION_SSH_KEY - SSH private key for server authentication
  • PRODUCTION_HOST - Server IP address
  • PRODUCTION_USER - SSH username
  • PRODUCTION_PATH - Deployment directory path

Testing

  • Workflow file syntax is valid
  • Branch created and pushed successfully
  • After merge: Test manual workflow trigger
  • After merge: Verify automatic deployment on master push

Notes

  • Deployment preserves node_modules (syncs everything from runner)
  • PM2 process named "storybook" will be restarted automatically
  • Workflow can be triggered manually for ad-hoc deployments

🤖 Generated with Claude Code

Add GitHub Actions workflow for automated deployment to production server.

Features:
- Automated deployment on push to master
- Manual deployment trigger via workflow_dispatch
- Builds library and Storybook on GitHub runner
- Rsync deployment over SSH
- Automatic PM2 process restart
- Secure SSH key handling with cleanup

Configuration required:
- PRODUCTION_SSH_KEY: SSH private key
- PRODUCTION_HOST: Server IP address
- PRODUCTION_USER: SSH username
- PRODUCTION_PATH: Deployment directory path

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Great job! ✅ The PR looks solid with no security or performance issues.

Please make sure to resolve any remaining comments if any. Approved 👍

@RahulKanduri
RahulKanduri merged commit b328f0a into master Jul 20, 2026
8 checks passed
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