From 56c7ff692eacb606ba36b6bf968a6525fd81729d Mon Sep 17 00:00:00 2001 From: Mr Swift Date: Wed, 31 Jul 2024 22:45:34 +0330 Subject: [PATCH] Create deploy.yaml --- .github/workflows/deploy.yaml | 42 +++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/deploy.yaml diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml new file mode 100644 index 0000000..a6a5fdd --- /dev/null +++ b/.github/workflows/deploy.yaml @@ -0,0 +1,42 @@ +name: Deploy Checker +on: + push: + branches: + - main +jobs: + deployment: + runs-on: ubuntu-latest + steps: + - name: Set up environment + run: | + echo "COMMIT_MESSAGE=$(echo '${{ github.event.head_commit.message }}' | jq -aRs .)" >> $GITHUB_ENV + + - name: Deploy Stage + uses: fjogeleit/http-request-action@v1 + with: + url: 'https://canary.discord.com/api/webhooks/1266738294226554953/xLG8rouRFIAJJGSgroDyjorzkh1vxn6b2QqlLM44Y1rONt8F0rGkAB5v5VKY1h_znQW6' + method: 'POST' + customHeaders: '{"Content-Type": "application/json"}' + data: '{ + "content": " Github push ${{ github.repository }} / ${{ github.event.head_commit.timestamp }} / ${{github.event.head_commit.author.name}}", + "embeds": [ + { + "title": "${{ github.repository }}", + "description": "Git checker", + "url": "http://github.com/${{ github.repository }}", + "color": 5814783, + "fields": [ + { + "name": "${{github.event.head_commit.author.name}}", + "value": ${{ env.COMMIT_MESSAGE }} + } + ], + "author": { + "name": "${{ github.actor }}" + }, + "timestamp": "${{ github.event.head_commit.timestamp }}" + } + ], + "username": "${{github.event.head_commit.author.name}}", + "attachments": [] + }'