Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preview & Deployment URL outputs are null when vercel build fails #262

Open
zognotadog opened this issue Sep 10, 2024 · 1 comment
Open

Comments

@zognotadog
Copy link

zognotadog commented Sep 10, 2024

When the vercel build fails, the preview and deploy outputs are not provided. We are trying to log the build logs in the PR if this happens. We cannot do this without the preview-url. Please can it be change to still output these on failure?

  # Deploy using the build files
  - name: Deploy to Vercel
    id: vercel-deploy
    uses: amondnet/vercel-action@v25 # Deploy to Vercel
    with:
      github-token: ${{ secrets.VERCEL_GITHUB_TOKEN }}  # Optional
      vercel-token: ${{ secrets.VERCEL_TOKEN }}  # Required
      vercel-org-id: ${{ vars.VERCEL_ORG_ID }}   # Required
      vercel-project-id: ${{ vars.VERCEL_PROJECT_ID }}  # Required 
      alias-domains: |
        ${{ 
          github.ref == 'refs/heads/main' && 'app.app.co.uk' || 
          github.ref == 'refs/heads/dev' && 'dev.app.co.uk'
        }}
      github-comment: true
  
  - name: Log Deployment Outputs
    if: failure()
    run: |
      echo "Deployment URL: ${{ steps.vercel-deploy.outputs.deployment-url }}"
      echo "Preview URL: ${{ steps.vercel-deploy.outputs.preview-url }}"`
@BenjaOliva
Copy link

Kind same issue here. The deploy is being done but when trying to log the step.[VERCEL_ACTION_STEP_ID].outputs.preview-url nothing is being shown.

This is avoiding our tests to run over the preview in our CI workflow after preview deployment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants