ci(deploy): Update default branch references from master to main

- Update Attach custom domain step condition to use main branch
- Update Create DNS record step condition to use main branch
- Align workflow with modern Git default branch naming conventions
This commit is contained in:
ksloan
2026-08-17 11:26:08 -04:00
parent 10f485419c
commit ed28f9e168
+3 -3
View File
@@ -27,8 +27,8 @@ jobs:
CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }} CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }} CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}
- name: Attach custom domain (master only) - name: Attach custom domain (main only)
if: github.ref == 'refs/heads/master' if: github.ref == 'refs/heads/main'
run: | run: |
echo "Adding domain ${CLOUDFLARE_CUSTOM_DOMAIN} to project ${CLOUDFLARE_PROJECT_NAME}..." echo "Adding domain ${CLOUDFLARE_CUSTOM_DOMAIN} to project ${CLOUDFLARE_PROJECT_NAME}..."
BODY=$(printf '{"name": "%s"}' "${CLOUDFLARE_CUSTOM_DOMAIN}") BODY=$(printf '{"name": "%s"}' "${CLOUDFLARE_CUSTOM_DOMAIN}")
@@ -49,7 +49,7 @@ jobs:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }} CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}
- name: Create DNS record for custom domain - name: Create DNS record for custom domain
if: github.ref == 'refs/heads/master' if: github.ref == 'refs/heads/main'
run: | run: |
# Extract root zone from the custom domain (e.g. product-example.sloanops.com -> sloanops.com) # Extract root zone from the custom domain (e.g. product-example.sloanops.com -> sloanops.com)
ROOT_ZONE="${CLOUDFLARE_CUSTOM_DOMAIN#*.}" ROOT_ZONE="${CLOUDFLARE_CUSTOM_DOMAIN#*.}"