Skip to content

Commit 18ff4f4

Browse files
authored
Update pr-preview.yml to support master branch
1 parent 4f824a6 commit 18ff4f4

File tree

1 file changed

+2
-23
lines changed

1 file changed

+2
-23
lines changed

.github/workflows/pr-preview.yml

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -34,27 +34,6 @@ jobs:
3434
with:
3535
repository: ${{ github.repository_owner }}/ivory-doc-builder
3636
path: ivory-doc-builder
37-
38-
- name: Determine Latest Version from ivorysql_docs branches
39-
id: latest_version_step
40-
shell: bash
41-
run: |
42-
echo "Detecting latest version from remote branches of ${{ github.repository_owner }}/ivorysql_docs..."
43-
LATEST_VERSION_NUMBER=$( \
44-
git ls-remote --heads --refs "https://github.com/${{ github.repository_owner }}/ivorysql_docs.git" 'refs/heads/v*.*' | \
45-
sed 's_^[^\t]*\trefs/heads/v__g' | \
46-
grep -E '^[0-9]+\.[0-9]+(\.[0-9]+)?$' | \
47-
sort -V | \
48-
tail -n1 \
49-
)
50-
51-
if [[ -z "$LATEST_VERSION_NUMBER" ]]; then
52-
echo "::error::Could not determine latest version from branches. Please check git ls-remote command and repo accessibility."
53-
exit 1
54-
fi
55-
56-
echo "Detected latest version number: $LATEST_VERSION_NUMBER"
57-
echo "version=$LATEST_VERSION_NUMBER" >> "$GITHUB_OUTPUT"
5837

5938
- name: Install yq
6039
run: |
@@ -67,7 +46,7 @@ jobs:
6746
- name: Modify Antora Playbooks for Local PR Build
6847
working-directory: ./ivory-doc-builder
6948
env:
70-
DETECTED_VERSION: '${{ steps.latest_version_step.outputs.version }}'
49+
DETECTED_VERSION: 'master'
7150
START_PAGE_COMPONENT_NAME: "ivorysql-doc"
7251
START_PAGE_FILE_PATH: "welcome.adoc"
7352
run: |
@@ -184,4 +163,4 @@ jobs:
184163
repo: context.repo.repo,
185164
issue_number: context.issue.number,
186165
body: body
187-
});
166+
});

0 commit comments

Comments
 (0)