mhausenblas / mkdocs-deploy-gh-pages

GitHub Action to deploy an MkDocs site to GitHub Pages
Apache License 2.0
245 stars 90 forks source link

custom docs_dir and custom domain #107

Open frealmyr opened 3 years ago

frealmyr commented 3 years ago

The CUSTOM_DOMAIN environment variable does not work when also using a custom docs_dir in mkdocs.yml.

When specifying a custom docs_dir such as

docs_dir: articles/

Build will fail with the following error:

/action.sh: line 24: /github/workspace/docs/CNAME: No such file or directory

The correct folder to target for CNAME file creation should in this instance should be articles/.

A neat way to solve this would be to lookup the key in mkdocs.yml (using yq maybe?), and the easiest would be to add another environment variable.

mhausenblas commented 3 years ago

Wanna PR it? :)