This document explains how Continuous Deployment (CD) is set up in this project and how developers can contribute and deploy changes safely.
We use GitHub Actions as our CI/CD pipeline to automate the deployment process:
- Build: Docker images are built from the project source.
- Publish: Docker images are pushed to GitHub Container Registry (ghcr.io).
- Deploy: The latest
docker-compose.ymlfile is transferred to the server via SSH. - Restart: On the server, the updated containers are pulled from ghcr.io and the service is restarted.
This ensures that every change merged into the main branch is automatically built, shipped, and deployed without manual intervention.
- The
mainbranch is the production branch and is protected. - Direct pushes to
mainare not allowed. - All changes must go through a pull request (PR) process.
To submit new changes:
- Create a feature branch:
git checkout -b feature/my-new-feature- Commit your changes:
git add .
git commit -m "Add: new feature"- Push the branch:
git push origin feature/my-new-feature- Open a Pull Request:
- Go to the GitHub repository page.
- Click "Compare & pull request".
- Describe your changes clearly.
- Wait for code review and approvals.
- Merge into
main:
- Once approved, the PR can be merged.
- Merging into
mainwill trigger the automated deployment process.
If something goes wrong after deployment:
- Check the GitHub Actions logs for the latest run.
- SSH into the server to manually inspect container logs:
docker compose logs -f- If needed, you can restart the service manually:
docker compose pull
docker compose up -dFor any issues or questions, please contact a maintainer or open an issue in the repository.