CI fix tentative #18
Some checks failed
Build and deploy all / build (test.json, /var/www/crashtest, test) (push) Successful in 43s
Build and deploy all / deploy (test.json, /var/www/crashtest, test) (push) Failing after 4s
Build and deploy all / notify (push) Successful in 2s

This commit is contained in:
Gu://em_ 2026-03-30 22:41:21 +02:00
parent 763dcdd1d0
commit 12531da5aa

View file

@ -77,7 +77,8 @@ jobs:
needs: build
runs-on: docker
strategy:
include: *site_matrix
matrix:
include: *site_matrix
steps:
- name: Setup SSH
@ -105,16 +106,32 @@ jobs:
if: always() # Always run
steps:
- name: Send Discord Notification
uses: https://github.com/appleboy/discord-action@master
with:
color: ${{ needs.deploy.result == 'success' && '48867' || '16711680' }}
message: |
**Deployment Report**
**Status:** ${{ needs.deploy.result }}
**Repo:** ${{ github.repository }}
**Commit:** ${{ github.sha }}
webhook_id: ${{ secrets.DISCORD_WEBHOOK_ID }}
webhook_token: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}
# uses: https://github.com/appleboy/discord-action@master
# with:
# color: ${{ needs.deploy.result == 'success' && '48867' || '16711680' }}
# message: |
# **Deployment Report**
# **Status:** ${{ needs.deploy.result }}
# **Repo:** ${{ github.repository }}
# **Commit:** ${{ github.sha }}
# webhook_id: ${{ secrets.DISCORD_WEBHOOK_ID }}
# webhook_token: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}
# Trial with curl as the above just fails
run: |
STATUS="${{ needs.deploy.result }}"
COLOR=$([ "$STATUS" == "success" ] && echo "48867" || echo "16711680")
curl -H "Content-Type: application/json" \
-X POST \
-d '{
"embeds": [{
"title": "Deployment Report",
"color": '$COLOR',
"description": "Status: **'$STATUS'**\nRepo: ${{ github.repository }}\nCommit: ${{ github.sha }}"
}]
}' \
"${{ secrets.DISCORD_WEBHOOK_URL }}"
# For later
# - name: Send Matrix Notification