From 7e7be2a7409fc21af8521318b8680e73b21ebd83 Mon Sep 17 00:00:00 2001 From: m5r Date: Sat, 28 Aug 2021 05:48:17 +0800 Subject: [PATCH] send notification to discord --- .github/workflows/main.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a584e88..0d0916c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -54,6 +54,11 @@ jobs: FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} with: args: "deploy -c ./fly.dev.toml --build-arg DATOCMS_API_TOKEN=${{ secrets.DATOCMS_API_TOKEN }}" + - uses: appleboy/discord-action@master + with: + webhook_id: ${{ secrets.DISCORD_WEBHOOK_ID }} + webhook_token: ${{ secrets.DISCORD_WEBHOOK_TOKEN }} + args: "https://dev.shellphone.dev deployed with commit `${{ github.sha }}` from branch `${{ github.ref }}`" deploy_prod: if: github.ref == 'refs/heads/production' @@ -67,4 +72,9 @@ jobs: FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} with: args: "deploy -c ./fly.prod.toml --build-arg DATOCMS_API_TOKEN=${{ secrets.DATOCMS_API_TOKEN }}" + - uses: appleboy/discord-action@master + with: + webhook_id: ${{ secrets.DISCORD_WEBHOOK_ID }} + webhook_token: ${{ secrets.DISCORD_WEBHOOK_TOKEN }} + args: "https://www.shellphone.dev deployed with commit `${{ github.sha }}` from branch `${{ github.ref }}`" # TODO: on pull_request, deploy 24hour-long deployment at {commit_short_hash}.shellphone.app, provision db and seed data