We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6742599 commit 0a01f03Copy full SHA for 0a01f03
1 file changed
.github/workflows/preview.yml
@@ -23,12 +23,20 @@ jobs:
23
uses: ./.github/actions/execute-notebooks
24
25
- name: Make BASE_URL
26
- run: echo ${{ github.ref }} | sed "s/[^0-9]//g" | (pr_preview=$(cat); echo -e "BASE_URL=/pr-preview/pr-$pr_preview/") >> $GITHUB_ENV
+ uses: actions/github-script@v6
27
+ id: base-url
28
+ with:
29
+ script: |
30
+ const refName = "${{ github.ref_name }}"; // PR_NUMBER/merge
31
+ const prNumber = refName.slice(0, refName.length - 6);
32
+ const baseUrl = `/pr-preview/pr-${prNumber}/`;
33
+ return baseUrl;
34
+ result-encoding: string
35
36
- name: Build
37
uses: ./.github/actions/build
38
with:
- base-url: ${{ env.BASE_URL }}
39
+ base-url: ${{ steps.base-url.outputs.result }}
40
41
- name: Deploy preview
42
uses: rossjrw/pr-preview-action@v1
0 commit comments