diff --git a/.github/workflows/comment-!build-commands.yml b/.github/workflows/comment-!build-commands.yml index 8d8a0ae096..883921137f 100644 --- a/.github/workflows/comment-!build-commands.yml +++ b/.github/workflows/comment-!build-commands.yml @@ -92,12 +92,37 @@ jobs: echo "Failed to detect if the build command written in the comment should have been '!build-dev', '!build-profiling', or '!build'" >> $GITHUB_OUTPUT fi + - name: 💬 Comment Actions run link + id: comment_actions_run_link + uses: actions/github-script@v6 + with: + script: | + github.rest.issues.updateComment({ + comment_id: ${{ github.event.comment.id }}, + owner: context.repo.owner, + repo: context.repo.repo, + body: '!build ([build link](https://github.com/GraphiteEditor/Graphite/actions/runs/' + context.runId + '))' + }); + - name: 🌐 Build Graphite web code env: NODE_ENV: production + if: ${{ success() || failure()}} run: | cd frontend mold -run npm run ${{ steps.build_command.outputs.command }} + + - name: ❗ Warn on build failure + if: ${{ failure() }} + uses: actions/github-script@v6 + with: + script: | + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: 'The build process has failed. Please check the [build logs](https://github.com/GraphiteEditor/Graphite/actions/runs/' + context.runId + ') for details.' + }); - name: 📤 Publish to Cloudflare Pages id: cloudflare @@ -110,6 +135,18 @@ jobs: projectName: graphite-dev directory: frontend/dist + - name: ❗ Warn on publish failure + if: ${{ failure() }} + uses: actions/github-script@v6 + with: + script: | + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: 'The deployment to Cloudflare Pages has failed. Please check the [build logs](https://github.com/GraphiteEditor/Graphite/actions/runs/' + context.runId + ') for details. + }); + - name: 💬 Comment build link uses: actions/github-script@v6 with: