xcode session has expired MacOS CI/CD

Hi! We have Mac in AWS we use it in our CI/CD process where iOS apps build. We don't need it all the time, so when we have longer break we turn off it and sometimes after run it the session in Xcode is expired. How we can deal with it? Is the way to log in to Xcode from command line? Maybe we can manage in some way to not expiring session? We use fastlane to build apps in CI/CD but it seems to require to be logged in in Xcode, despite use of Api key (App Store Connect API).

xcode session has expired MacOS CI/CD
 
 
Q