CI shouldn't do deployments, deployment pipelines should run separately when a new release passes CI
Of course the general purpose task runner that both run on does need to support secrets
Of course the general purpose task runner that both run on does need to support secrets
Only the CI part needs to build; it needs little else and it's the only part of a coherent setup that needs to build.
https://docs.github.com/en/actions/how-tos/secure-your-work/...
IE no prod access by editing the workflow definition and pushing it to a branch.