Skip to content

Commit 1d3f72f

Browse files
authored
Override git author on vercel deployments (#473)
1 parent 2b0115d commit 1d3f72f

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

.changeset/tired-dingos-open.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

.github/workflows/docs.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ jobs:
8686
id: deploy-preview
8787
if: env.IS_PRODUCTION == 'false'
8888
run: |
89+
rm -rf .git # Remove the .git directory to avoid vercel to read the current author
8990
DEPLOYMENT_URL=$(vercel deploy --prebuilt --token ${{ secrets.VERCEL_TOKEN }})
9091
echo "deployment_url=$DEPLOYMENT_URL" >> $GITHUB_OUTPUT
9192
echo "Preview deployment URL: $DEPLOYMENT_URL"
@@ -101,4 +102,6 @@ jobs:
101102

102103
- name: Deploy to Vercel (Production)
103104
if: env.IS_PRODUCTION == 'true'
104-
run: vercel deploy --prebuilt --prod --token ${{ secrets.VERCEL_TOKEN }}
105+
run: |
106+
rm -rf .git # Remove the .git directory to avoid vercel to read the current author
107+
vercel deploy --prebuilt --prod --token ${{ secrets.VERCEL_TOKEN }}

.github/workflows/example.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ jobs:
9292
id: deploy-preview
9393
if: env.IS_PRODUCTION == 'false'
9494
run: |
95+
rm -rf .git # Remove the .git directory to avoid vercel to read the current author
9596
DEPLOYMENT_URL=$(vercel deploy --prebuilt --token ${{ secrets.VERCEL_TOKEN }})
9697
echo "deployment_url=$DEPLOYMENT_URL" >> $GITHUB_OUTPUT
9798
echo "Preview deployment URL: $DEPLOYMENT_URL"
@@ -107,4 +108,6 @@ jobs:
107108

108109
- name: Deploy to Vercel (Production)
109110
if: env.IS_PRODUCTION == 'true'
110-
run: vercel deploy --prebuilt --prod --token ${{ secrets.VERCEL_TOKEN }}
111+
run: |
112+
rm -rf .git # Remove the .git directory to avoid vercel to read the current author
113+
vercel deploy --prebuilt --prod --token ${{ secrets.VERCEL_TOKEN }}

0 commit comments

Comments
 (0)