Skip to content

Commit

Permalink
issue #33: add and update inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
vivalareda committed Nov 28, 2023
1 parent 203b67c commit 1ba0a74
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/workflow-vercel-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,20 @@ name: Vercel Preview Deployment
on:
workflow_call:
inputs:
repository-name:
vercel-project-name:
required: true
type: string
deployment_environment:
required: true
type: string
description: 'Deployment environment (dev, prd, uat)'


env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
REPOSITORY_NAME: ${{ inputs.repository-name }}
VERCEL_PROJECT_NAME: ${{ inputs.vercel-project-name}}
DEPLOYMENT_ENVIRONMENT: ${{ inputs.deployment_environment }}

permissions:
checks: read
Expand All @@ -32,10 +37,4 @@ jobs:
- name: Deploy Project Artifacts to Vercel
run: echo "DEPLOYMENT_URL=$(vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }})" >> $GITHUB_ENV
- name: Set URL to dev environment
run: vc alias "$DEPLOYMENT_URL" ${{ env.REPOSITORY_NAME }}-dev.vercel.app --token=${{ secrets.VERCEL_TOKEN }}

- name: Comment on PR with Custom Domain
uses: JoseThen/comment-pr@v1.2.0
with:
comment: "Deployment preview URL: https://${{ env.REPOSITORY_NAME }}-dev.vercel.app/"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: vc alias "$DEPLOYMENT_URL" ${{ env.VERCEL_PROJECT_NAME }}-${{ env.DEPLOYMENT_ENVIRONMENT }}.vercel.app --token=${{ secrets.VERCEL_TOKEN }}

0 comments on commit 1ba0a74

Please sign in to comment.