netlifyでpoetryを利用したmkdocsをデプロイする#
pythonバージョンは3.8を指定
[tool.poetry.dependencies]
python = "^3.8"
以下のnetlify.tomlをリポジトリに追加
[build]
publish = "site/"
command = """
pip install -q poetry &&
poetry export -f requirements.txt -o requirements.txt &&
pip install -r requirements.txt &&
mkdocs build
"""
参考#
- GitHub PagesからNetlifyへ | MSSP
- Support Poetry for Python · Issue
#221
· netlify/build-image · GitHub - Support Poetry for Python · Issue
#221
· netlify/build-image · GitHub - [Framework integrations | Netlify Docs](https://docs.netlify.com/integrations/frameworks/
#mkdocs)
- Poetryでrequirements.txtを作成 - Minerva