Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for a custom path and domain at the same time #244

Closed
wants to merge 9 commits into from
16 changes: 11 additions & 5 deletions action.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,21 @@ else
fi
fi

if [ -n "${CUSTOM_DOMAIN}" ]; then
print_info "Setting custom domain for github pages"
echo "${CUSTOM_DOMAIN}" > "${GITHUB_WORKSPACE}/docs/CNAME"
fi

if [ -n "${CONFIG_FILE}" ]; then
print_info "Setting custom path for mkdocs config yml"
export CONFIG_FILE="${GITHUB_WORKSPACE}/${CONFIG_FILE}"
if [ -n "${CUSTOM_DOMAIN}" ]; then
print_info "Setting custom domain for github pages"
echo "${CUSTOM_DOMAIN}" > "${CONFIG_FILE%\/*}/CNAME"
echo "${CONFIG_FILE%\/*}"
ls "${CONFIG_FILE%\/*}"
ls "${GITHUB_WORKSPACE}"
fi
else
if [ -n "${CUSTOM_DOMAIN}" ]; then
print_info "Setting custom domain for github pages"
echo "${CUSTOM_DOMAIN}" > "${GITHUB_WORKSPACE}/docs/CNAME"
fi
export CONFIG_FILE="${GITHUB_WORKSPACE}/mkdocs.yml"
fi

Expand Down