Skip to content

Commit

Permalink
refactor: refactored some code to have correct JSON parsed
Browse files Browse the repository at this point in the history
  • Loading branch information
GhostVaibhav committed Jul 14, 2024
1 parent 4019117 commit b46f60e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/node.js.branch.deploy.end.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ jobs:
- name: Getting the temporary CNAME record ID from the Repo
run: |
echo "CNAME_ID = $(curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GENERATE_TEMPORARY_BRANCH_WEBSITE }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
-H 'Accept: application/vnd.github+json' \
-H 'Authorization: Bearer ${{ secrets.GENERATE_TEMPORARY_BRANCH_WEBSITE }}' \
-H 'X-GitHub-Api-Version: 2022-11-28' \
https://api.github.com/repos/Temporary-Feature-Branch/${{ github.ref_name }} | jq '.description')" >> $GITHUB_ENV
- name: Deleting the new website's CNAME value from Cloudflare
run: |
curl --request DELETE \
--url https://api.cloudflare.com/client/v4/zones/${{ secrets.CNAME_ZONE_ID }}/dns_records/${{ env.CNAME_ID }} \
--url https://api.cloudflare.com/client/v4/zones/${{ secrets.CNAME_ZONE_ID }}/dns_records/"'$CNAME_ID'" \
--header 'Content-Type: application/json' \
--header 'X-Auth-Email: [email protected]' \
--header 'X-Auth-Key: ${{ secrets.CNAME_KEY }}'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/node.js.branch.deploy.push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,5 @@ jobs:
source-directory: 'build'
destination-github-username: 'Temporary-Feature-Branch'
destination-repository-name: '${{ github.ref_name }}-Simple'
user-email: sharmavaibhav110028@gmail.com
user-email: [email protected].com
target-branch: main
6 changes: 3 additions & 3 deletions .github/workflows/node.js.branch.deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
"proxied": true,
"type": "CNAME",
"comment": "Temporary Feature Branch",
"id": ${{ env.CNAME_ID }},
"id": "'"$CNAME_ID"'",
"ttl": 3600
}'
sleep 10
Expand All @@ -61,7 +61,7 @@ jobs:
https://api.github.com/orgs/Temporary-Feature-Branch/repos \
-d '{
"name": "${{ github.ref_name }}-Simple",
"description": "$CNAME_ID",
"description": "'"$CNAME_ID"'",
"homepage": "https://github.com/GhostVaibhav/Simple",
"visibility": "public",
"has_issues": false,
Expand All @@ -77,7 +77,7 @@ jobs:
source-directory: 'build'
destination-github-username: 'Temporary-Feature-Branch'
destination-repository-name: '${{ github.ref_name }}-Simple'
user-email: sharmavaibhav110028@gmail.com
user-email: [email protected].com
target-branch: main
- name: Enabling GitHub Pages for the temporary repository
run: |
Expand Down

0 comments on commit b46f60e

Please sign in to comment.