Skip to content

Commit

Permalink
chore: update docs logic
Browse files Browse the repository at this point in the history
  • Loading branch information
mohnoor94 committed Apr 21, 2024
1 parent a7d3a6a commit 7f6cd5a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/generate-docs-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ jobs:
touch index.html
LIST_ITEMS=""
for dir in $(ls -d */ | sort -rV); do
if [ "$dir" != "${{ github.event.inputs.version }}/" ]; then
if [ "$dir" != "${{ github.event.inputs.version }}/" ] && [ "$dir" != "latest/" ]; then
LIST_ITEMS="${LIST_ITEMS}<li><a href=\"${dir}\">${dir}</a></li>"
fi
done
sed "s#{{list_items}}#${LIST_ITEMS}#g" ${{ runner.temp }}/resources/docs-home-template.html > index.html
sed "s#{{list_items}}#${LIST_ITEMS}#g; s#{{latest_version}}#${{ github.event.inputs.version }}#g" ${{ runner.temp }}/resources/docs-home-template.html > index.html
ln -sfn ./${{ github.event.inputs.version }} ./latest
- name: Commit
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/resources/docs-home-template.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
</head>
<body>
<h1>Expedia Group Rapid SDK Reference Documentation</h1>
<p>Latest Version: {{latest_version}}</p>
<ul>
{{list_items}}
</ul>
Expand Down

0 comments on commit 7f6cd5a

Please sign in to comment.