Skip to content
Open
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
c4089ff
chore: build break test with 31st June
pranav-new-relic Nov 7, 2025
325c207
chore: AI experiment to revamp netlify build comment workflow
pranav-new-relic Nov 7, 2025
bd5807a
chore: try making the workflow more resilient?
pranav-new-relic Nov 7, 2025
7067c95
chore: breaking the infinite loop of build, by splitting build and de…
pranav-new-relic Nov 7, 2025
14f3427
chore: test PR v2, build break test with 31st June: DO NOT MERGE
pranav-new-relic Nov 7, 2025
e8b32c1
chore: optimize workflow?
pranav-new-relic Nov 7, 2025
45f85f9
chore: fix forked member check part of the workflow?
pranav-new-relic Nov 7, 2025
0c499f0
chore: working so good so far, optimize timestamp diff logic
pranav-new-relic Nov 7, 2025
6608308
chore: works as expected, some cosmetic changes
pranav-new-relic Nov 7, 2025
a2f5c11
chore: works as expected, some cosmetic changes, probably final?
pranav-new-relic Nov 7, 2025
e30124a
chore: merge branch 'develop' into np-test-v2
pranav-new-relic Nov 8, 2025
b13e0f1
chore: remove the build failure inducer to test success flow
pranav-new-relic Nov 8, 2025
b804bdf
chore: more cosmetics, timezone changes, informative PR comments
pranav-new-relic Nov 8, 2025
0c3b9ad
chore: tiny fixes
pranav-new-relic Nov 8, 2025
a349995
chore: tiny fixes
pranav-new-relic Nov 8, 2025
178dac1
chore: hopefully cosmetic changes should work now?
pranav-new-relic Nov 8, 2025
48e9c34
chore: hopefully cosmetic changes should work now?
pranav-new-relic Nov 8, 2025
2af0fc9
chore: hopefully cosmetic changes should work now?
pranav-new-relic Nov 8, 2025
c8b24e1
chore: more cosmetic changes
pranav-new-relic Nov 9, 2025
3aa8f44
chore: more cosmetic changes
pranav-new-relic Nov 9, 2025
4e8055f
chore: probably the final set of cosmetic changes to logs
pranav-new-relic Nov 9, 2025
b471f8f
chore: introduce immediate change to test parallel build that will break
pranav-new-relic Nov 9, 2025
00ea5c5
chore: workflow concurrency test 1
pranav-new-relic Nov 9, 2025
a3d6027
chore: workflow concurrency test 1, change to trigger concurrency
pranav-new-relic Nov 9, 2025
21ca8d0
chore: revert concurrency logic, revisit tomorrow
pranav-new-relic Nov 9, 2025
516e1a6
chore: revert concurrency logic, revisit tomorrow
pranav-new-relic Nov 9, 2025
62c2af4
chore: concurrency test v2
pranav-new-relic Nov 9, 2025
4695fab
chore: concurrency test v2, trigger concurrency now
pranav-new-relic Nov 9, 2025
f57bf80
chore: revert concurrency strategy v2
pranav-new-relic Nov 9, 2025
a507627
chore: revert concurrency strategy v2
pranav-new-relic Nov 9, 2025
8eb5dbf
chore: revisit running deploy block mechanism
pranav-new-relic Nov 25, 2025
b96d052
chore: merge branch 'develop' into np-test-v2
pranav-new-relic Nov 25, 2025
924ea45
chore: revert failure case
pranav-new-relic Nov 25, 2025
50fa9d3
chore: small scale cosmetic fixes to dates
pranav-new-relic Nov 25, 2025
e611b72
chore: small scale cosmetic fixes
pranav-new-relic Nov 25, 2025
af94944
chore: empty commit test #1
pranav-new-relic Nov 25, 2025
37e0d09
chore: empty commit test, expect no new deployment
pranav-new-relic Nov 25, 2025
e8fb944
chore: test commit to tigger deployment
pranav-new-relic Nov 25, 2025
50a51e8
chore: empty commit to induce ongoing deploy comment
pranav-new-relic Nov 25, 2025
c901d11
chore: changes to try validating the comment again
pranav-new-relic Nov 25, 2025
e5d6296
chore: commit to trigger deploy
pranav-new-relic Nov 25, 2025
ecac756
chore: empty commit to induce ongoing deploy comment
pranav-new-relic Nov 25, 2025
bffdc3b
chore: empty commit to induce ongoing deploy comment
pranav-new-relic Nov 25, 2025
ec0f92e
chore: final set of changes to validate tokens when they expire
pranav-new-relic Nov 25, 2025
2c8bb45
chore: remove experimental triggers, revert to comment based
pranav-new-relic Nov 26, 2025
c82a8cc
chore: merge branch 'develop' into np-test-v2
pranav-new-relic Nov 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: breaking the infinite loop of build, by splitting build and de…
…ploy commands
  • Loading branch information
pranav-new-relic authored Nov 7, 2025
commit 7067c956a86df32ea837975539467e4cfcb01a8e
22 changes: 16 additions & 6 deletions .github/workflows/final-manual-deploy-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ jobs:
You can follow the build live [here](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}).
# This tag is CRUCIAL. It lets the final step find and replace this comment.
comment_tag: manual-build-comment
# THIS IS THE FIX for the pending comment
github_token: ${{ secrets.GITHUB_TOKEN }}

# We must check out the actual code from the PR head
- name: Checkout PR head
Expand All @@ -127,7 +129,6 @@ jobs:
# Set this to the Node.js version your docs site uses
node-version: '18'

# THIS IS THE MODIFIED STEP
- name: Install Dependencies
run: |
if [ -f yarn.lock ]; then
Expand All @@ -147,7 +148,7 @@ jobs:
- name: Install Netlify CLI
run: npm install -g netlify-cli

# This is the new build step. It REPLACES your 'curl' step.
# THIS STEP IS NOW SEPARATED INTO BUILD AND DEPLOY
- name: Build and Deploy Preview
id: netlify_deploy
# This is CRUCIAL! It lets the next step run even if this one fails.
Expand All @@ -156,9 +157,16 @@ jobs:
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
run: |
# --alias creates a predictable URL like: deploy-preview-123.netlify.app
# --json captures the output so we can parse it
deploy_output=$(netlify deploy --build --json --alias="deploy-preview-${{ steps.pr_info.outputs.pr_number }}" --message="Deploy preview for PR #${{ steps.pr_info.outputs.pr_number }}")
# Step 1: Run the build. This WILL stream logs.
# If this fails, the 'continue-on-error' will catch it, and the
# 'Update PR comment' step will report the failure.
echo "Running Netlify Build... (logs will stream)"
netlify build

# Step 2: If build succeeded, deploy the site.
# This is fast and can safely use --json.
echo "Deploying to Netlify..."
deploy_output=$(netlify deploy --json --alias="deploy-preview-${{ steps.pr_info.outputs.pr_number }}" --message="Deploy preview for PR #${{ steps.pr_info.outputs.pr_number }}")

# Save the full output for debugging
echo "NETLIFY_DEPLOY_OUTPUT<<EOF" >> $GITHUB_ENV
Expand All @@ -173,7 +181,7 @@ jobs:

# Check if 'deploy_url' is null or empty, which indicates a build failure
if [ -z "$deploy_url" ] || [ "$deploy_url" == "null" ]; then
echo "Build failed! No deploy_url returned."
echo "Build failed or deploy_url not found!"
# This ensures the 'outcome' of this step is 'failure'
exit 1
fi
Expand All @@ -184,6 +192,8 @@ jobs:
with:
# This tag finds the "pending" comment and replaces it
comment_tag: manual-build-comment
# THIS IS THE FIX for the final comment
github_token: ${{ secrets.GITHUB_TOKEN }}
# This logic posts a different message based on the build step's outcome
message: |
${{ steps.netlify_deploy.outcome == 'success' && format('### <span aria-hidden="true">✅</span> Build Succeeded: Preview Ready!
Expand Down
Loading