forked from streamlink/streamlink
-
Notifications
You must be signed in to change notification settings - Fork 0
/
netlify.toml
43 lines (40 loc) · 1.8 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# 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 = """\
git fetch --tags https://github.com/streamlink/streamlink.git \
&& 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/plugins/
# - 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/plugins/ \
src/streamlink_cli/argparser.py
"""
[build.environment]
# Set the latest natively available Python version in the Ubuntu env (currently 20.04 / Focal)
# https://docs.netlify.com/configure-builds/manage-dependencies/#python
# https://github.com/netlify/build-image/blob/xenial/included_software.md
PYTHON_VERSION = "3.8"
# 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