'Using GitHub Actions to manage Vercel deployments

I'm using GitHub Actions to handle my Vercel deployments via BetaHuhn/deploy-to-vercel-action. My workflow should deploy to Vercel then alias the deployment to dev.mydomain.me, but it's not working. It gets hung when trying to Add the vercel alias domain.

deploy-dev.yml

name: Deploy Development CI
on:
  push:
    branches: [main]
jobs:
  deploy:
    runs-on: ubuntu-latest
    if: "!contains(github.event.head_commit.message, '[skip ci]')"
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Deploy to Vercel Action
        uses: BetaHuhn/deploy-to-vercel-action@v1
        with:
          GITHUB_TOKEN: ${{ secrets.GH_PAT }}
          VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
          VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
          VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
          PRODUCTION: false
          ALIAS_DOMAINS: |
            dev.mydomain.me

Background

I have two environments - dev.mydomain.me and mydomain.me. The DNS is registered via AWS Route53. I added an A record (in Route53) for mydomain.me with the A record IP that Vercel gave me. I also added a CNAME record for dev.mydomain.me with cname.vercel-dns.com. Both are working correctly.

I notice in Vercel that dev.mydomain.me has a Production badge next it. So my thought is that a non-production Vercel deployment cannot be associated to a production domain.

enter image description here

I should also note that my GitHub repo is not integrated with Vercel. I'm also aware that if I were to integrate my GitHub repo and I associate a domain to a non-production branch, then the domain will not have the Production badge assigned to it. This is not an option for me, as I want to have my production deploy kickoff when a GitHub Release is published and Vercel does not support that.

Question

If my assumptions are correct, how do I go about setting up dev.mydomain.me as a non-production domain in Vercel? The Vercel docs are not clear on how to do this.

If they're not correct, what am I doing wrong and how can I have my non-production Vercel deployment associated to dev.mydomain.me?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source