Skip to content

Commit 159f36a

Browse files
Show commit subjects on Netlify deploys
Production deploys now upload the already-built dist directory from GitHub Actions. Unlike Netlify's Git-driven deploys for previews/branch deploys, this CLI upload does not automatically populate the deploy message. So pass the latest commit subject explicitly.
1 parent a592980 commit 159f36a

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

.github/workflows/vrt.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,11 @@ jobs:
7676
run: npm run build
7777

7878
- name: Deploy to Netlify
79-
run: >
80-
npx --yes netlify-cli deploy --prod --dir=dist --site
81-
"$NETLIFY_SITE_ID" --auth "$NETLIFY_AUTH_TOKEN"
79+
run: |
80+
deploy_message="$(git log -1 --pretty=%s)"
81+
npx --yes netlify-cli deploy --prod --dir=dist --site \
82+
"$NETLIFY_SITE_ID" --auth "$NETLIFY_AUTH_TOKEN" \
83+
--message "$deploy_message"
8284
env:
8385
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
8486
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}

0 commit comments

Comments
 (0)