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:
@@ -27,8 +27,8 @@ jobs:
|
||||
CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
|
||||
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}
|
||||
|
||||
- name: Attach custom domain (master only)
|
||||
if: github.ref == 'refs/heads/master'
|
||||
- name: Attach custom domain (main only)
|
||||
if: github.ref == 'refs/heads/main'
|
||||
run: |
|
||||
echo "Adding domain ${CLOUDFLARE_CUSTOM_DOMAIN} to project ${CLOUDFLARE_PROJECT_NAME}..."
|
||||
BODY=$(printf '{"name": "%s"}' "${CLOUDFLARE_CUSTOM_DOMAIN}")
|
||||
@@ -49,7 +49,7 @@ jobs:
|
||||
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}
|
||||
|
||||
- name: Create DNS record for custom domain
|
||||
if: github.ref == 'refs/heads/master'
|
||||
if: github.ref == 'refs/heads/main'
|
||||
run: |
|
||||
# Extract root zone from the custom domain (e.g. product-example.sloanops.com -> sloanops.com)
|
||||
ROOT_ZONE="${CLOUDFLARE_CUSTOM_DOMAIN#*.}"
|
||||
|
||||
Reference in New Issue
Block a user