The folder name of the resources was added in the .gitignore file. That means Xcode Cloud wasn't getting the resources needed to build. That is why I was getting the error. I have removed the folder name from .gitignore file. Now it is working as expected.
Topic:
Developer Tools & Services
SubTopic:
Xcode Cloud
Tags: