From 15578c7801b5af0c1e740f4eef63afe2763463f6 Mon Sep 17 00:00:00 2001 From: Vitor Hideyoshi Date: Tue, 21 Apr 2026 16:00:26 -0300 Subject: [PATCH] feat: remove DATABASE_URL from Vercel deployment workflow environment variables --- .github/workflows/deploy-preview.yml | 42 ++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/deploy-preview.yml diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml new file mode 100644 index 0000000..7db3928 --- /dev/null +++ b/.github/workflows/deploy-preview.yml @@ -0,0 +1,42 @@ +name: Vercel Preview Deployment + +env: + VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} + VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} + +on: + pull_request: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Install Vercel CLI + run: npm install --global vercel@latest + + - name: Pull Vercel Environment Information + run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }} + + - name: Build Project Artifacts + run: vercel build --token=${{ secrets.VERCEL_TOKEN }} + + - name: Deploy Project Artifacts to Vercel + id: deploy + run: echo "url=$(vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }})" >> $GITHUB_OUTPUT + + - name: Comment Preview URL on PR + uses: actions/github-script@v7 + with: + script: | + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: `🔍 **Preview deployment ready!**\n\n${{ steps.deploy.outputs.url }}` + }) + -- 2.49.1