Skip to content

Commit

Permalink
fix: regex for fixing links in landing page (#458)
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgepiloto authored Apr 17, 2024
1 parent 0161b18 commit 10e8c2b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions doc-deploy-dev/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -233,12 +233,12 @@ runs:
run: |
if [[ -f 'version/stable/index.html' ]]; then
cp version/stable/index.html index.html
sed -i 's/href="\([^http]\)/href="version\/stable\/\1/g' index.html
sed -i 's/src="\([^http]\)/src="version\/stable\/\1/g' index.html
sed -i 's/href="\([^:"]*\)"/href="version\/stable\/\1"/g' index.html
sed -i 's/src="\([^:"]*\)"/src="version\/stable\/\1"/g' index.html
elif [[ -f 'version/dev/index.html' ]]; then
cp version/dev/index.html index.html
sed -i 's/href="\([^http]\)/href="version\/dev\/\1/g' index.html
sed -i 's/src="\([^http]\)/src="version\/dev\/\1/g' index.html
sed -i 's/href="\([^:"]*\)"/href="version\/dev\/\1"/g' index.html
sed -i 's/src="\([^:"]*\)"/src="version\/dev\/\1"/g' index.html
else
echo "Error: The 'index.html' file does not exist." >&2
exit 1
Expand Down
8 changes: 4 additions & 4 deletions doc-deploy-stable/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -403,12 +403,12 @@ runs:
run: |
if [[ -f 'version/stable/index.html' ]]; then
cp version/stable/index.html index.html
sed -i 's/href="\([^http]\)/href="version\/stable\/\1/g' index.html
sed -i 's/src="\([^http]\)/src="version\/stable\/\1/g' index.html
sed -i 's/href="\([^:"]*\)"/href="version\/stable\/\1"/g' index.html
sed -i 's/src="\([^:"]*\)"/src="version\/stable\/\1"/g' index.html
elif [[ -f 'version/dev/index.html' ]]; then
cp version/dev/index.html index.html
sed -i 's/href="\([^http]\)/href="version\/dev\/\1/g' index.html
sed -i 's/src="\([^http]\)/src="version\/dev\/\1/g' index.html
sed -i 's/href="\([^:"]*\)"/href="version\/dev\/\1"/g' index.html
sed -i 's/src="\([^:"]*\)"/src="version\/dev\/\1"/g' index.html
else
echo "Error: The 'index.html' file does not exist." >&2
exit 1
Expand Down

0 comments on commit 10e8c2b

Please sign in to comment.