From fc9d40602848a8f264fce67832558c9fca916a8e Mon Sep 17 00:00:00 2001 From: cicdguy <26552821+cicdguy@users.noreply.github.com> Date: Fri, 9 Feb 2024 08:06:44 -0600 Subject: [PATCH] fix: Handle empty default landing page --- .github/workflows/pkgdown.yaml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index 0e1864e8..5b2c70ae 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -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 }}