Skip to content

Commit

Permalink
Handle empty default landing page (#209)
Browse files Browse the repository at this point in the history
Otherwise there will be infinite redirects.
  • Loading branch information
cicdguy authored Feb 9, 2024
1 parent da7ff81 commit e46f687
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -289,11 +289,23 @@ jobs:
path: ${{ github.event.repository.name }}
ref: "gh-pages"

- name: Normalize inputs 📄
id: normalize
run: |
DEFAULT_LANDING_PAGE="${{ inputs.default-landing-page }}"
if [ "$DEFAULT_LANDING_PAGE" == "" ]
then {
DEFAULT_LANDING_PAGE=main
}
fi
echo "default-landing-page=$DEFAULT_LANDING_PAGE" >> "$GITHUB_ENV"
shell: bash

- name: Create and publish docs ↗️
uses: insightsengineering/r-pkgdown-multiversion@v2
with:
path: ${{ github.event.repository.name }}
default-landing-page: ${{ inputs.default-landing-page }}
default-landing-page: ${{ env.default-landing-page }}
refs-order: ${{ inputs.refs-order }}
latest-tag-alt-name: ${{ inputs.latest-tag-alt-name }}
release-candidate-alt-name: ${{ inputs.release-candidate-alt-name }}
Expand Down

0 comments on commit e46f687

Please sign in to comment.