forked from streamlink/streamlink
-
Notifications
You must be signed in to change notification settings - Fork 0
/
netlify.toml
28 lines (25 loc) · 1.58 KB
/
netlify.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Streamlink documentation preview config for pull requests via netlify.com
# Some settings like PR statuses for example can only be configured via the netlify website
# https://docs.netlify.com/configure-builds/file-based-configuration/#build-settings
[build]
command = "pip install -U pip setuptools && pip install -e . && pip install -U -r docs-requirements.txt && make --directory=docs clean html"
publish = "docs/_build/html"
# Since production builds can't be disabled without disabling PRs as well, pushes to the master branch need to be ignored.
# Also ignore pull requests which don't include any changes that would alter the docs:
# - CHANGELOG.md (symlinked from docs/changelog.md)
# - docs/
# - docs-requirements.txt
# - src/streamlink_cli/argparser.py
# https://docs.netlify.com/configure-builds/file-based-configuration/#ignore-builds
ignore = "[ $(git rev-parse --abbrev-ref HEAD) = master ] || git diff --quiet master HEAD CHANGELOG.md docs/ docs-requirements.txt src/streamlink_cli/argparser.py"
[build.environment]
# Set the latest natively available Python version in the Ubuntu env (currently 16.04 / Xenial)
# https://docs.netlify.com/configure-builds/manage-dependencies/#python
# https://github.com/netlify/build-image/blob/xenial/included_software.md
PYTHON_VERSION = "3.7"
# Builds on untagged commits are always "latest", but since it's built on the root docs dir, actual "latest" links will cause 404 errors
# https://docs.netlify.com/configure-builds/file-based-configuration/#redirects
[[redirects]]
from = "/latest/*"
to = "/:splat"
status = 301