adds community not found page with necessary emoji animation #76
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
COMMIT_AUTHOR=$(echo '${{ toJson(github.event) }}' | jq -r '.head_commit.author.username') | |
COMMIT_URL="$REPO_URL/commit/${{ github.sha }}" | |
# Create JSON payload | |
JSON_PAYLOAD=$(cat <<EOF | |
{ | |
"content": "🚀 A new update has been pushed to our platform! **${{ github.repository }}**\n\n**Author**: ${COMMIT_AUTHOR}\n[View Commit](${COMMIT_URL})" | |
} | |
EOF | |
) | |
# Send the message to Discord | |
curl -X POST \ | |
-H "Content-Type: application/json" \ | |
-d "$JSON_PAYLOAD" \ | |
$DISCORD_WEBHOOK_URL |