Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
21 changes: 17 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -212,11 +212,24 @@ jobs:
run: |
echo "inside pr_number=$PR_NUMBER"
echo "Before pr_number=$PR_NUMBER"
PR_API_URL="https://api.github.com/repos/${GITHUB_REPOSITORY}/commits/${GITHUB_SHA}/pulls"
PR_NUMBER=$(curl -s -H "Accept: application/vnd.github.groot-preview+json" \

PR_API_URL="https://api.github.com/repos/${GITHUB_REPOSITORY}/pulls?state=open"
PR_NUMBER=$(curl -s -H "Accept: application/vnd.github.v3+json" \
-H "Authorization: Bearer $GITHUB_TOKEN" \
$PR_API_URL | jq '.[0].number')
echo "after pr_number=$PR_NUMBER"
$PR_API_URL | jq '.[] | select(.head.sha == "'${GITHUB_SHA}'") | .number')
if [ -z "$PR_NUMBER" ]; then
echo "No PR associated with this commit. Skipping deployment."
exit 0
fi
echo "PR_NUMBER=$PR_NUMBER"



#PR_API_URL="https://api.github.com/repos/${GITHUB_REPOSITORY}/commits/${GITHUB_SHA}/pulls"
#PR_NUMBER=$(curl -s -H "Accept: application/vnd.github.groot-preview+json" \
# -H "Authorization: Bearer $GITHUB_TOKEN" \
# $PR_API_URL | jq '.[0].number')
#echo "after pr_number=$PR_NUMBER"
aws s3 sync s3://$S3_BUCKET_NAME/mergeRequest/$PR_NUMBER s3://$S3_BUCKET_NAME/production/
echo "deploy complete to production !!!"
# Delete contents of the pr folder
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ author: That Would Be Me
# Dec 23 04:15 Updating this line
# Dec 23 04:39 Updating this line
# Dec 23 04:39 Updating this line
# two
# Dec 23 05:58 Updating this line
# one

# Change seven 7
Expand Down