To deploy to a sandbox, be sure that you have already created a sandbox, or head to the Creating a sandbox section of our documentation for more information.
Follow the initial steps in Creating a Deployment to start a deployment. When selecting the Destination Network, you'll see the name of your available sandboxes in the dropdown.
The Deployment Account section that appears after selecting a sandbox allows you to specify which of the 10 auto-generated accounts to use for the deployment. By selecting one of these accounts, all transactions will automatically be confirmed using the specified account. You can optionally select MetaMask to confirm your own transactions through MetaMask like you would for any other network.
If you're deploying to a sandbox using MetaMask as the Deployment Account, then you have to connect the sandbox instance to MetaMask. Clickand copy the RPC URL of the sandbox you'd like to deploy to. Open MetaMask and save the RPC URL as a Custom RPC.