Skip to content

adds shadcn components #7

adds shadcn components

adds shadcn components #7

name: Notify Discord on Commit
on:
push:
branches:
- main
jobs:
notify-discord:
runs-on: ubuntu-latest
steps:
- name: Send Discord Notification
env:
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
REPO_URL: https://github.com/${{ github.repository }}
run: |
# Extract commit details using jq
COMMIT_MESSAGE=$(echo '${{ toJson(github.event) }}' | jq -r '.head_commit.message')
COMMIT_AUTHOR=$(echo '${{ toJson(github.event) }}' | jq -r '.head_commit.author.username')
COMMIT_URL="$REPO_URL/commit/${{ github.sha }}"
# Send the message to Discord
curl -X POST \
-H "Content-Type: application/json" \
-d "{\"content\": \"🚀 A new update has been pushed to our platform! **${{ github.repository }}**\\n\\n**Commit Message**: $COMMIT_MESSAGE\\n**Author**: $COMMIT_AUTHOR\\n[View Commit]($COMMIT_URL)\"}" \
$DISCORD_WEBHOOK_URL