diff --git a/.github/workflows/ci-and-deploy.yml b/.github/workflows/ci-and-deploy.yml index 896910e..29bfd82 100644 --- a/.github/workflows/ci-and-deploy.yml +++ b/.github/workflows/ci-and-deploy.yml @@ -9,6 +9,10 @@ on: branches: - "**" - "!dependabot/**" + push: + branches: + - "prod" + - "dev" workflow_dispatch: env: @@ -106,10 +110,11 @@ jobs: apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} gitHubToken: ${{ secrets.GITHUB_TOKEN }} - command: pages deploy --branch=${{ github.event.pull_request.head.ref }} + command: pages deploy --branch=${{ github.event.pull_request.head.ref || github.ref_name }} outputs: preview-url: ${{ steps.deploy.outputs.pages-deployment-alias-url }} + deploy-env: ${{ steps.deploy.outputs.pages-environment }} send_result: name: Send Result @@ -144,5 +149,5 @@ jobs: with: TYPE: success TITLE: "✅ Build Succeeded" - DESCRIPTION: "Preview URL: ${{ needs.build_and_deploy.outputs.preview-url }}" + DESCRIPTION: "Preview URL: ${{ needs.build_and_deploy.outputs.preview-url }}\\nEnvironment: ${{ needs.build_and_deploy.outputs.deploy-env }})" DISCORD_WEBHOOK_URL: ${{ secrets.SANDBOX_DISCORD_WEBHOOK_URL }} diff --git a/.github/workflows/pr-notification.yml b/.github/workflows/pr-notification.yml index 45e04c3..9c5982a 100644 --- a/.github/workflows/pr-notification.yml +++ b/.github/workflows/pr-notification.yml @@ -5,7 +5,7 @@ on: branches: "**" env: - TITLE: "## ${{ github.event.pull_request.title }}" + TITLE: "${{ github.event.pull_request.title }}" PR_LINK: "PR Link: [PR #${{ github.event.number }}](${{ github.server_url }}/${{ github.repository }}/pull/${{ github.event.number }})" DESCRIPTION: "${{ github.event.pull_request.body || 'No description' }}" @@ -24,5 +24,6 @@ jobs: TITLE: "🔔 ${{ env.TITLE }}" DESCRIPTION: "${{ env.PR_LINK }}\\n\\n${{ env.DESCRIPTION }}" AUTHOR_NAME: ${{ github.event.pull_request.user.name || github.event.pull_request.user.login }} + AUTHOR_URL: ${{ github.event.pull_request.user.html_url }} AUTHOR_ICON_URL: ${{ github.event.pull_request.user.avatar_url }} DISCORD_WEBHOOK_URL: ${{ secrets.SANDBOX_DISCORD_WEBHOOK_URL }}