In Traditional AEM Sites, Themes can be managed in a separate GIT Repo (so Front End Developers are not bothered with AEM Maven) and deployed via Front End Pipeline (explained here). This post applies similar concept to EDS Repos. With a EDS Repoless Setup and Reusing Blocks across sites, Brand FE Developers can add Styling for Multiple Brands without working directly in the EDS repo (flow below assumes feature and main branches only for simplicity, however any AEM project generally has feature, develop, release, main and hotfix branches)
1) eaem-brand-styles: GIT Repo where Front End developers add scss styles for branding, a Front End Only Repo
Git Flow: eaem-brand-styles → eaem-dev-eds
1) Local Development & Commit: Make changes to SCSS files in the eaem-brand-styles repository, commit them locally, and push to GitHub. The pre-push hook automatically runs npm run release to build the CSS files before pushing.
2) GitHub Actions Trigger: When code is pushed to the master or main branch, GitHub Actions Workflow (eaem-brand-styles.github/workflows/deploy-to-eds.yml) automatically triggers and runs the build process in a clean environment.
3) Build & Clone: The workflow installs dependencies, runs npm run release to generate the CSS files in the release/ folder, then clones the eaem-dev-eds repository using the DEPLOY_TOKEN secret for authentication.
4) Copy & Deploy: The workflow copies all files from eaem-brand-styles/release/* to eaem-dev-eds/styles/, commits the changes and automatically pushes to the eaem-dev-eds repository, making the styles immediately available.





This is really cool concept. This might be a good solution for one of my requirements. Thanks
ReplyDelete