From 134ea61468dd93dd69c21eb9c357bbe118de08ea Mon Sep 17 00:00:00 2001 From: Samuel K Date: Mon, 18 May 2026 09:51:46 -0500 Subject: [PATCH 1/7] fix(ci): exclude CLI deploys from Netlify restore search --- .github/workflows/netlify-ops.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/netlify-ops.yml b/.github/workflows/netlify-ops.yml index 004cbe900..a4a618a4e 100644 --- a/.github/workflows/netlify-ops.yml +++ b/.github/workflows/netlify-ops.yml @@ -26,12 +26,12 @@ jobs: DEPLOYS=$(curl -s -H "Authorization: Bearer $NETLIFY_AUTH_TOKEN" \ "https://api.netlify.com/api/v1/sites/$NETLIFY_SITE_ID/deploys?per_page=100") - DEPLOY_ID=$(echo "$DEPLOYS" | jq -r '[.[] | select(.state == "ready")] | .[0].id') - DEPLOY_INFO=$(echo "$DEPLOYS" | jq -r '[.[] | select(.state == "ready")] | .[0] | {id, created_at, deploy_source, title}') + DEPLOY_ID=$(echo "$DEPLOYS" | jq -r '[.[] | select(.state == "ready" and .deploy_source != "cli")] | .[0].id') + DEPLOY_INFO=$(echo "$DEPLOYS" | jq -r '[.[] | select(.state == "ready" and .deploy_source != "cli")] | .[0] | {id, created_at, deploy_source, title}') if [ "$DEPLOY_ID" = "null" ] || [ -z "$DEPLOY_ID" ]; then - echo "ERROR: No ready deploy found in last 100. States seen:" - echo "$DEPLOYS" | jq '[.[] | .state] | group_by(.) | map({state: .[0], count: length})' + echo "ERROR: No non-CLI ready deploy found in last 100. All deploys:" + echo "$DEPLOYS" | jq '.[] | {id, state, deploy_source, created_at}' | head -80 exit 1 fi From a1e20365880d3970844a80dda119a8e136bf971d Mon Sep 17 00:00:00 2001 From: Samuel K Date: Mon, 18 May 2026 10:04:51 -0500 Subject: [PATCH 2/7] chore(ci): add custom domain operation to netlify-ops workflow --- .github/workflows/netlify-ops.yml | 42 +++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/.github/workflows/netlify-ops.yml b/.github/workflows/netlify-ops.yml index a4a618a4e..39ad592f9 100644 --- a/.github/workflows/netlify-ops.yml +++ b/.github/workflows/netlify-ops.yml @@ -10,6 +10,7 @@ on: options: - restore-devsy-sh - find-dl-site + - add-dl-custom-domain jobs: restore-devsy-sh: @@ -94,3 +95,44 @@ jobs: echo "NETLIFY_DL_SITE_ID = $DL_SITE_ID" echo "========================================" echo "Run: gh secret set NETLIFY_DL_SITE_ID --org devsy-org --visibility all --body \"$DL_SITE_ID\"" + + add-dl-custom-domain: + name: Add dl.devsy.sh Custom Domain to dl-devsy-sh Site + if: inputs.operation == 'add-dl-custom-domain' + runs-on: ubuntu-latest + env: + NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} + DL_SITE_ID: a6c8ca4e-62c1-4c75-95ba-1abcd2af540f + steps: + - name: Add custom domain and report DNS instructions + run: | + echo "Adding dl.devsy.sh as custom domain to site $DL_SITE_ID..." + RESPONSE=$(curl -s -w "\n%{http_code}" -X PUT \ + -H "Authorization: Bearer $NETLIFY_AUTH_TOKEN" \ + -H "Content-Type: application/json" \ + -d '{"custom_domain": "dl.devsy.sh"}' \ + "https://api.netlify.com/api/v1/sites/$DL_SITE_ID") + + HTTP_CODE=$(echo "$RESPONSE" | tail -1) + BODY=$(echo "$RESPONSE" | sed '$d') + + if [ "$HTTP_CODE" != "200" ] && [ "$HTTP_CODE" != "201" ]; then + echo "ERROR: Custom domain update failed (HTTP $HTTP_CODE)" + echo "$BODY" + exit 1 + fi + + echo "Custom domain set (HTTP $HTTP_CODE)" + NETLIFY_SUBDOMAIN=$(echo "$BODY" | jq -r '.subdomain // .name') + echo "" + echo "========================================" + echo "CUSTOM DOMAIN CONFIGURED: dl.devsy.sh" + echo "========================================" + echo "" + echo "CEO DNS action required — add this DNS record:" + echo " Type: CNAME" + echo " Name: dl" + echo " Value: ${NETLIFY_SUBDOMAIN}.netlify.app" + echo "" + echo "Full site info:" + echo "$BODY" | jq '{id, name, custom_domain, subdomain, url, ssl_url}' From 66525fff4108b1063cee58579c5b3adae92a3138 Mon Sep 17 00:00:00 2001 From: Samuel K Date: Mon, 18 May 2026 10:11:37 -0500 Subject: [PATCH 3/7] fix(ci): add fetch-tags to promote-release checkout step --- .github/workflows/promote-release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/promote-release.yml b/.github/workflows/promote-release.yml index 5512c8be5..0ae5abf7b 100644 --- a/.github/workflows/promote-release.yml +++ b/.github/workflows/promote-release.yml @@ -24,6 +24,8 @@ jobs: private-key: ${{ secrets.DEVSY_GITHUB_APP_PRIVATE_KEY }} - uses: actions/checkout@v6 + with: + fetch-tags: true - name: validate RC tag env: From 5085867158e58cd0aebe3b56627017ea6fce357b Mon Sep 17 00:00:00 2001 From: Samuel K Date: Mon, 18 May 2026 10:19:19 -0500 Subject: [PATCH 4/7] fix(ci): use GITHUB_TOKEN for release.yml dispatch in promote workflow --- .github/workflows/promote-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/promote-release.yml b/.github/workflows/promote-release.yml index 0ae5abf7b..cbe62b3aa 100644 --- a/.github/workflows/promote-release.yml +++ b/.github/workflows/promote-release.yml @@ -82,7 +82,7 @@ jobs: - name: trigger full rebuild env: - GH_TOKEN: ${{ steps.app-token.outputs.token }} + GH_TOKEN: ${{ github.token }} STABLE_TAG: ${{ steps.version.outputs.stable_tag }} run: | gh workflow run release.yml \ From 8f917cfdd67e202e5f0d5b9f8c35b92f2dcbb14e Mon Sep 17 00:00:00 2001 From: Samuel K Date: Mon, 18 May 2026 11:27:32 -0500 Subject: [PATCH 5/7] fix(ci): publish stable release as latest instead of draft in promote workflow --- .github/workflows/promote-release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/promote-release.yml b/.github/workflows/promote-release.yml index cbe62b3aa..7df0f90d4 100644 --- a/.github/workflows/promote-release.yml +++ b/.github/workflows/promote-release.yml @@ -76,9 +76,9 @@ jobs: --title "$STABLE_TAG" \ --generate-notes \ --notes-start-tag "$RC_TAG" \ - --draft + --latest - echo "Created draft stable release $STABLE_TAG" + echo "Created stable release $STABLE_TAG" - name: trigger full rebuild env: From 3e89c43b785fde460657f0a3a75771708c3f1799 Mon Sep 17 00:00:00 2001 From: Samuel K Date: Mon, 18 May 2026 11:29:00 -0500 Subject: [PATCH 6/7] fix(ci): copy RC release notes to stable release on promotion --- .github/workflows/promote-release.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/promote-release.yml b/.github/workflows/promote-release.yml index 7df0f90d4..761fbf682 100644 --- a/.github/workflows/promote-release.yml +++ b/.github/workflows/promote-release.yml @@ -71,11 +71,12 @@ jobs: COMMIT_SHA: ${{ steps.version.outputs.commit_sha }} RC_TAG: ${{ inputs.rc_tag }} run: | + RC_BODY=$(gh release view "$RC_TAG" --json body -q .body) + gh release create "$STABLE_TAG" \ --target "$COMMIT_SHA" \ --title "$STABLE_TAG" \ - --generate-notes \ - --notes-start-tag "$RC_TAG" \ + --notes "$RC_BODY" \ --latest echo "Created stable release $STABLE_TAG" From 8d9b0e8d641c67340b1e05e4a65ae015a939795f Mon Sep 17 00:00:00 2001 From: Samuel K Date: Mon, 18 May 2026 11:34:25 -0500 Subject: [PATCH 7/7] fix(ci): use softprops/action-gh-release for stable release creation --- .github/workflows/promote-release.yml | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/.github/workflows/promote-release.yml b/.github/workflows/promote-release.yml index 761fbf682..ee5032647 100644 --- a/.github/workflows/promote-release.yml +++ b/.github/workflows/promote-release.yml @@ -64,22 +64,26 @@ jobs: echo "Stable tag: $STABLE_TAG at commit: $COMMIT_SHA" - - name: create stable release + - name: fetch RC release notes + id: rc_notes env: GH_TOKEN: ${{ steps.app-token.outputs.token }} - STABLE_TAG: ${{ steps.version.outputs.stable_tag }} - COMMIT_SHA: ${{ steps.version.outputs.commit_sha }} RC_TAG: ${{ inputs.rc_tag }} run: | - RC_BODY=$(gh release view "$RC_TAG" --json body -q .body) - - gh release create "$STABLE_TAG" \ - --target "$COMMIT_SHA" \ - --title "$STABLE_TAG" \ - --notes "$RC_BODY" \ - --latest + BODY=$(gh release view "$RC_TAG" --json body -q .body) + { echo "body<> "$GITHUB_OUTPUT" - echo "Created stable release $STABLE_TAG" + - name: create stable release + uses: softprops/action-gh-release@v3 + with: + token: ${{ steps.app-token.outputs.token }} + tag_name: ${{ steps.version.outputs.stable_tag }} + target_commitish: ${{ steps.version.outputs.commit_sha }} + name: ${{ steps.version.outputs.stable_tag }} + body: ${{ steps.rc_notes.outputs.body }} + draft: false + prerelease: false + make_latest: true - name: trigger full rebuild env: