Skip to content

Commit d411e7b

Browse files
committed
Add test deploy via docker, update README
1 parent bb7beae commit d411e7b

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,13 @@ When you push to github, the official site at http://opentechschool.github.io/py
4747

4848
To generate and view the site (with correct CSS, etc.) with your on your local computer, you can install Jekyll and then run it like this:
4949

50+
If you have [docker installed on your system](https://docs.docker.com/get-docker/) the easiest way to test the site locally is by running
51+
`./testlocal.sh`
52+
53+
It will download a suitable docker image for jekyll and run the code within this container, making it available via http://localhost:4000/python-data-intro/
54+
55+
Alternatively, you can run the following steps manually:
56+
5057
jekyll --serve --auto
5158
# or
5259
jekyll serve --watch

testlocal.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/sh
2+
3+
# run local jekyll server; will be served at localhost:4000
4+
export JEKYLL_VERSION=3.8
5+
docker run --rm \
6+
--volume="$PWD:/srv/jekyll" -p 4000:4000 \
7+
--env JEKYLL_UID=$(id -u) --env JEKYLL_GID=$(id -g) \
8+
-it jekyll/jekyll:$JEKYLL_VERSION \
9+
jekyll serve --future --drafts

0 commit comments

Comments
 (0)