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 needs: build
runs-on: docker runs-on: docker
strategy: strategy:
include: *site_matrix matrix:
include: *site_matrix
steps: steps:
- name: Setup SSH - name: Setup SSH
@ -105,16 +106,32 @@ jobs:
if: always() # Always run if: always() # Always run
steps: steps:
- name: Send Discord Notification - name: Send Discord Notification
uses: https://github.com/appleboy/discord-action@master # uses: https://github.com/appleboy/discord-action@master
with: # with:
color: ${{ needs.deploy.result == 'success' && '48867' || '16711680' }} # color: ${{ needs.deploy.result == 'success' && '48867' || '16711680' }}
message: | # message: |
**Deployment Report** # **Deployment Report**
**Status:** ${{ needs.deploy.result }} # **Status:** ${{ needs.deploy.result }}
**Repo:** ${{ github.repository }} # **Repo:** ${{ github.repository }}
**Commit:** ${{ github.sha }} # **Commit:** ${{ github.sha }}
webhook_id: ${{ secrets.DISCORD_WEBHOOK_ID }} # webhook_id: ${{ secrets.DISCORD_WEBHOOK_ID }}
webhook_token: ${{ secrets.DISCORD_WEBHOOK_TOKEN }} # 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 # For later
# - name: Send Matrix Notification # - name: Send Matrix Notification