Skip to content

Commit

Permalink
fix: complete HTML file for redirect (#406)
Browse files Browse the repository at this point in the history
Co-authored-by: Roberto Pastor Muela <37798125+RobPasMue@users.noreply.github.com>
  • Loading branch information
jorgepiloto and RobPasMue committed Feb 23, 2024
1 parent 477dddb commit cf2503b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 12 deletions.
16 changes: 10 additions & 6 deletions doc-deploy-dev/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -229,15 +229,19 @@ runs:
shell: bash
run: |
echo "<!DOCTYPE html>" > index.html
echo "<meta charset=\"utf-8\">" >> index.html
echo "<html>" >> index.html
echo " <head>" >> index.html
echo " <meta charset=\"utf-8\">" >> index.html
if [ -z "${{ inputs.redirection-title }}" ]; then
echo "<title>Redirecting to ${{ env.REDIRECTION_URL }}</title>" >> index.html
echo " <title>Redirecting to ${{ env.REDIRECTION_URL }}</title>" >> index.html
else
echo "<title>${{ inputs.redirection-title }}</title>" >> index.html
echo " <title>${{ inputs.redirection-title }}</title>" >> index.html
fi
echo "<meta name=\"description\" content=\"${{ inputs.redirection-description }}\">" >> index.html
echo "<meta http-equiv=\"refresh\" content=\"0; URL=${{ env.REDIRECTION_URL }}\">" >> index.html
echo "<link rel=\"canonical\" href=\"${{ env.REDIRECTION_URL }}\">" >> index.html
echo " <meta name=\"description\" content=\"${{ inputs.redirection-description }}\">" >> index.html
echo " <meta http-equiv=\"refresh\" content=\"0; URL=${{ env.REDIRECTION_URL }}\">" >> index.html
echo " <link rel=\"canonical\" href=\"${{ env.REDIRECTION_URL }}\">" >> index.html
echo " </head>" >> index.html
echo "</html>" >> index.html
- name: "Show the contents of the 'index.html' redirection file"
shell: bash
Expand Down
16 changes: 10 additions & 6 deletions doc-deploy-stable/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -391,15 +391,19 @@ runs:
shell: bash
run: |
echo "<!DOCTYPE html>" > index.html
echo "<meta charset=\"utf-8\">" >> index.html
echo "<html>" >> index.html
echo " <head>" >> index.html
echo " <meta charset=\"utf-8\">" >> index.html
if [ -z "${{ inputs.redirection-title }}" ]; then
echo "<title>Redirecting to ${{ env.REDIRECTION_URL }}</title>" >> index.html
echo " <title>Redirecting to ${{ env.REDIRECTION_URL }}</title>" >> index.html
else
echo "<title>${{ inputs.redirection-title }}</title>" >> index.html
echo " <title>${{ inputs.redirection-title }}</title>" >> index.html
fi
echo "<meta name=\"description\" content=\"${{ inputs.redirection-description }}\">" >> index.html
echo "<meta http-equiv=\"refresh\" content=\"0; URL=${{ env.REDIRECTION_URL }}\">" >> index.html
echo "<link rel=\"canonical\" href=\"${{ env.REDIRECTION_URL }}\">" >> index.html
echo " <meta name=\"description\" content=\"${{ inputs.redirection-description }}\">" >> index.html
echo " <meta http-equiv=\"refresh\" content=\"0; URL=${{ env.REDIRECTION_URL }}\">" >> index.html
echo " <link rel=\"canonical\" href=\"${{ env.REDIRECTION_URL }}\">" >> index.html
echo " </head>" >> index.html
echo "</html>" >> index.html
- name: "Show the contents of the 'index.html' redirection file"
shell: bash
Expand Down

0 comments on commit cf2503b

Please sign in to comment.