FAQ - ThulaniThisarani/noteapp GitHub Wiki

โ“ FAQ

This page addresses common questions about the deployment process, CI/CD pipeline, environment setup, and operational recovery.


โœ… What happens after a push to the develop branch?

A GitHub Actions workflow is triggered automatically:

  1. The code is checked out
  2. Dependencies are installed (npm ci)
  3. Tests are run (npm test)
  4. The project is built (npm run build)
  5. The built files are deployed to the AWS S3 bucket defined in the secrets

๐Ÿ”„ How do I switch traffic from green to blue?

If you're using a blue-green deployment setup:

  • CloudFront: Update the origin domain in your CloudFront distribution to point to the new S3 bucket (e.g., from myapp-green.s3.amazonaws.com to myapp-blue.s3.amazonaws.com)
  • Route 53: Change the alias record or CNAME record to point to the newly deployed S3 bucket

๐Ÿ’ก Use weighted routing or failover policies for smoother cutovers.


๐Ÿ” Can I roll back to a previous deployment?

Yes. Options include:

  • Point CloudFront/Route53 back to the previous S3 bucket (blue or green)
  • Use S3 Versioning to restore previous files
  • Re-deploy a previously tagged Git commit

๐Ÿ” Where are AWS credentials stored?

All secrets are securely stored in GitHub Secrets:

  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY
  • AWS_S3_BUCKET
  • CLOUDFRONT_DISTRIBUTION_ID (if used)

They are injected into the GitHub Actions workflow as environment variables.


๐ŸŒ What regions and S3 buckets are used?

You can define these based on your architecture. Example:

  • AWS_REGION: us-east-1
  • myapp-blue: Primary deployment
  • myapp-green: Alternate environment for blue-green deployment

๐Ÿงช How do I test changes before production?

  • All pushes go to the develop branch and deploy to a staging bucket (green or blue)
  • Preview the deployed site via its S3 static website URL or CloudFront URL before switching traffic

โš ๏ธ What happens if the deployment fails?

  • The GitHub Actions workflow fails and stops
  • The production environment remains untouched
  • Notifications can be configured to alert the team (e.g., via Slack, email, or GitHub Actions status checks)

๐Ÿ’พ Do we have backup or disaster recovery in place?

Yes:

  • S3 Versioning protects against accidental deletions or overwrites
  • Daily backups of deployment artifacts are stored in a separate S3 backup bucket
  • Cross-region replication (if enabled) protects against AWS region outages

๐Ÿ“Š How is uptime and performance monitored?

  • Synthetic monitoring (optional): Regular pings to the site
  • CloudWatch metrics: For S3, CloudFront, and Lambda (if applicable)
  • SNS alerts: For errors, latency spikes, or health check failures

๐Ÿท๏ธ What naming conventions are followed?

  • Branches: main (optional), develop, feature/*
  • S3 buckets: myapp-blue, myapp-green
  • Environments in GitHub: develop, production
  • GitHub Action files: ci-cd.yml, deploy.yml

๐Ÿ”„ How often can we deploy?

Any time! Since it's a fully automated CI/CD pipeline, you can deploy with each commit to develop, or use manual approvals in protected branches for production.


๐Ÿ“ฅ Can we add a manual approval before deployment?

Yes, GitHub Actions supports environment protection rules such as:

  • Manual approval
  • Required reviewers
  • Deployment wait timers

Feel free to contribute to this FAQ or raise a discussion if your question isn't covered here.