Fix embeds when value is empty #141
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: Deploy Develop | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ "develop" ] | |
jobs: | |
ci: | |
uses: ./.github/workflows/ci.yml | |
name: Build and test | |
deploy: | |
name: Deploy Docker image | |
environment: staging | |
needs: [ci] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: fjogeleit/http-request-action@v1 | |
continue-on-error: true | |
with: | |
url: 'https://bot.test.macro-deck.app/webhook/deploy' | |
method: 'POST' | |
bearerToken: ${{ secrets.TESTBOT_WEBHOOK_DEPLOY_KEY }} | |
customHeaders: '{"Content-Type": "application/json" }' | |
data: '{"toEveryone":false,"embed":{"color":{"r":0,"g":1,"b":0},"description":"MacroBot is updating to ${{ github.sha }}.","fields":[{"name":"Branch","value":"Develop","inline":false},{"name":"SHA","value":"${{ github.sha }}","inline":false}]}}' | |
- name: Updating the image on the server | |
uses: Macro-Deck-App/Actions/deploy@main | |
with: | |
host: ${{ secrets.TEST_DEPLOY_HOST }} | |
user: ${{ secrets.TEST_DEPLOY_USER }} | |
key: ${{ secrets.TEST_DEPLOY_KEY }} | |
known-hosts: ${{ secrets.TEST_DEPLOY_KNOWN_HOSTS }} | |
sha: ${{ github.sha }} | |
service: macro-bot |