diff --git a/.forgejo/workflows/deploy.yaml b/.forgejo/workflows/deploy.yaml index 01fb4d1..e0aab90 100644 --- a/.forgejo/workflows/deploy.yaml +++ b/.forgejo/workflows/deploy.yaml @@ -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