Is it possible to connect a domain to a preview deployment without connecting a git repo?
My company self-hosts a Github Enterprise server, so I can’t connect the git repo to the Vercel project. I’ve set up the deployment from Github actions for both my preview deployment and production deployment. I have a domain connected to the production deployment.
I’d like to set a custom domain for the preview deployment, but when I set another domain and try to connect it to the preview deployment, it won’t let me connect without also connecting a git repo. Is it possible to connect a domain with the preview deployment without having to connect a git repo?
The domain troubleshooting guide can help with most custom domain configuration issues. You might be able to use that guide to solve it before a human is available to help you. Then you can come back here and share the answer for bonus points.
You can also use v0 to narrow down the possibilities.
Ended up using the alias command in Github actions according to here. Helpful docs for alias. I also had to specify the team scope because it said I did not have access to the domain. source
- name: Deploy Project Artifacts to Vercel
run: |
url="$(vercel deploy --scope [team-slug] --prebuilt --token=${{ secrets.VERCEL_TOKEN }})"
vercel --scope [team-slug] alias --token=${{ secrets.VERCEL_TOKEN }} set "$url" preview.example.com