Merge branch 'documentation-livereload' into 'develop'
Documentation livereload See merge request funkwhale/funkwhale!88
This commit is contained in:
commit
0f5b1c295e
|
@ -86,15 +86,12 @@ build_front:
|
||||||
|
|
||||||
pages:
|
pages:
|
||||||
stage: test
|
stage: test
|
||||||
image: alpine
|
image: python:3.6-alpine
|
||||||
before_script:
|
before_script:
|
||||||
- cd docs
|
- cd docs
|
||||||
script:
|
script:
|
||||||
- apk --no-cache add py2-pip python-dev
|
|
||||||
- pip install sphinx
|
- pip install sphinx
|
||||||
- apk --no-cache add make
|
- python -m sphinx . ../public
|
||||||
- make html
|
|
||||||
- mv _build/html/ ../public
|
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- public
|
- public
|
||||||
|
|
9
dev.yml
9
dev.yml
|
@ -71,3 +71,12 @@ services:
|
||||||
- ./api/funkwhale_api/media:/protected/media
|
- ./api/funkwhale_api/media:/protected/media
|
||||||
ports:
|
ports:
|
||||||
- "0.0.0.0:6001:6001"
|
- "0.0.0.0:6001:6001"
|
||||||
|
|
||||||
|
docs:
|
||||||
|
build: docs
|
||||||
|
command: python serve.py
|
||||||
|
volumes:
|
||||||
|
- ".:/app/"
|
||||||
|
ports:
|
||||||
|
- '35730:35730'
|
||||||
|
- '8001:8001'
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
FROM python:3.6-alpine
|
||||||
|
|
||||||
|
RUN pip install sphinx livereload
|
||||||
|
WORKDIR /app/docs
|
|
@ -0,0 +1,13 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
from subprocess import call
|
||||||
|
# initial make
|
||||||
|
call(["python", "-m", "sphinx", ".", "/tmp/_build"])
|
||||||
|
from livereload import Server, shell
|
||||||
|
|
||||||
|
server = Server()
|
||||||
|
server.watch('.', shell('python -m sphinx . /tmp/_build'))
|
||||||
|
server.serve(
|
||||||
|
root='/tmp/_build/',
|
||||||
|
liveport=35730,
|
||||||
|
port=8001,
|
||||||
|
host='0.0.0.0')
|
Loading…
Reference in New Issue