Set up SSH access and deployments
Give the person SSH access with their public key, connect the site's Git repository and branch, add the crons it needs and run a first deployment.
On this page
Start it
Paste this into an assistant that is connected to Corefinity.
Use the Corefinity MCP prompt "set-up-ssh-and-deploy" with site: <the site: its domain, or the id of any of its environments>, environment: <the environment's name, for example staging. without it the prompt works on production when this token may, otherwise on the first environment it may>, repository: <the git repository to deploy from, once it is connected on the site's deployments tab>, branch: <the git branch to deploy>. Follow it step by step and tell me before anything that changes my account.Arguments
siteRequired
The site: its domain, or the id of any of its environments.
environment
The environment's name, for example Staging. Without it the prompt works on production when this token may, otherwise on the first environment it may.
repository
The Git repository to deploy from, once it is connected on the site's Deployments tab.
branch
The Git branch to deploy.
What your assistant is told
Purpose: give the person SSH access to <the site's domain> with their own key, connect its Git repository and run a first deployment.
- Repository: <repository>.
- Branch: <branch>.
Before you start
- The row you work on is site row <the id of the site row you work on> (<the environment's name>). Use it as
site_id. - Ask for the person's public key. Never ask for a private key.
- Ask before every change, and type a
confirm_*value only after the person has said yes to that exact action. - If a call is refused because this token lacks a scope or the site is outside its limits, the person is asked to allow it in the Control Panel; carry on once they have.
Steps
- SSH. Read
corestack_ssh_access_get, then add the person's public key withcorestack_ssh_quick_setup. If they want one key for every site of the company, usecorestack_company_ssh_key_create. - Git. Read
corestack_anddeployments_ repositories_ list corestack_deployments_branches_list. If no repository is connected, tell the person to connect one on the site's Deployments tab, and wait. Then set it withcorestack_deployments_repository_setand choose the mode withcorestack_deployments_mode_set. Runcorestack_before the deployment (it advises, never gates) and tell the person what it found: a deployment stops at linking shared files without the settings file its platform needs (such asdeployments_ shared_ files_ check .env) unless their repository includes it, which no check can see before the build, and a missing file'smessagesays where to create it over SFTP or SSH. Then runcorestack_deployment_triggerwhen they say so, whether or not they create the file; follow it withcorestack_deployments_get. For build, database or post-deploy commands, use the steps of theset-up-deployment-pipelineprompt. - Crons the application needs: check them with
corestack_crons_validate, then save them withcorestack_crons_update. - Verify with
corestack_site_http_checkor the smoke test,corestack_site_smoke_test.
Stop and ask
- Before the first deployment to production.
- If the person offers a private key or a password: refuse it and ask for the public key instead.
When you are done
Report the SSH command the person can use and the deployment's result.
Was this helpful?