version: "3" services: drafts: # enable posts in _draft folder command: jekyll serve --drafts image: jekyll/jekyll:latest volumes: - .:/srv/jekyll ports: - 4000:4000 site: command: jekyll serve image: jekyll/jekyll:latest volumes: - .:/srv/jekyll ports: - 4000:4000 build: command: jekyll build image: jekyll/jekyll:latest volumes: - .:/srv/jekyll # docker-compose up site # docker-compose up build # push generated _site to git repo # git subtree push --prefix _site/ ssh://git@138.2.88.57:222/zarif59/_site.git master