diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml index 270f8342..bbe26993 100644 --- a/.github/workflows/preview.yaml +++ b/.github/workflows/preview.yaml @@ -3,9 +3,6 @@ env: VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} on: - push: - branches: - - dev pull_request: branches-ignore: - main diff --git a/.github/workflows/production.yaml b/.github/workflows/production.yaml index 2fe27c70..7f14cdf2 100644 --- a/.github/workflows/production.yaml +++ b/.github/workflows/production.yaml @@ -20,6 +20,9 @@ jobs: - name: Build Project Artifacts run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} - name: Deploy Project Artifacts to Vercel - run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} + id: deploy + run: | + DEPLOY_URL=$(vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} | grep -o 'https://[^ ]*') + echo "::set-output name=url::$DEPLOY_URL" - name: Set Fixed Domain Alias - run: vercel alias set https://weplanplans-dev.vercel.app/ --token=${{ secrets.VERCEL_TOKEN }} + run: vercel alias set ${{ steps.deploy.outputs.url }} https://weplanplans-dev.vercel.app/ --token=${{ secrets.VERCEL_TOKEN }}