Skip to content

Commit 15c2f65

Browse files
authored
Update preview.yml
1 parent e964dcd commit 15c2f65

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/preview.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ jobs:
5454
BRANCH: "${{ env.GITHUB_BRANCH_NAME }}"
5555
run: make preview
5656

57+
- name: Get safe branch and export to env
58+
run: |
59+
echo "SAFE_BRANCH=$(make safe_branch)" >> $GITHUB_ENV
60+
5761
- name: Update PR Comment
5862
uses: actions/github-script@v7
5963
if: github.event_name == 'pull_request'
@@ -80,8 +84,8 @@ jobs:
8084
}
8185
});
8286
83-
const branch_name = process.env.GITHUB_BRANCH_NAME;
84-
const url = "https://" + branch_name + "." + process.env.PREVIEW_HOSTNAME;
87+
const safe_branch = process.env.SAFE_BRANCH;
88+
const url = "https://" + safe_branch + "." + process.env.PREVIEW_HOSTNAME;
8589
const timestamp = new Date().toISOString();
8690
const header = "\n|Key|Value|\n|---|---|\n"
8791
const body = preview_identifier + header + "|url|" + url + "|\n|last update|" + timestamp + "|";

0 commit comments

Comments
 (0)