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:
- The code is checked out
- Dependencies are installed (
npm ci) - Tests are run (
npm test) - The project is built (
npm run build) - 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.comtomyapp-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_IDAWS_SECRET_ACCESS_KEYAWS_S3_BUCKETCLOUDFRONT_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-1myapp-blue: Primary deploymentmyapp-green: Alternate environment for blue-green deployment
๐งช How do I test changes before production?
- All pushes go to the
developbranch and deploy to a staging bucket (greenorblue) - 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.