| version: 2 |
| jobs: |
| build: |
| working_directory: ~/sphinx_materialdesign_theme |
| docker: |
| - image: circleci/python:3.6.4 |
| steps: |
| - checkout |
| - run: sudo chown -R circleci:circleci /usr/local/bin |
| - run: sudo chown -R circleci:circleci /usr/local/lib/python3.6/site-packages |
| - run: |
| name: install dependencies |
| command: pip install -r requirements.txt |
| - run: |
| name: build |
| command: sphinx-build -b html ./example ./_build |
| - run: |
| name: deploy |
| command: | |
| remote=$(git config remote.origin.url) |
| pushd _build > /dev/null |
| git config --global user.email "$GH_EMAIL" > /dev/null 2>&1 |
| git config --global user.name "$GH_NAME" > /dev/null 2>&1 |
| touch .nojekyll |
| git init |
| git add . |
| git commit -m "Deploy to GitHub Pages. [skip ci]" |
| git push --force --quiet $remote master:gh-pages |
| popd > /dev/null |
| workflows: |
| version: 2 |
| build_flow: |
| jobs: |
| - build: |
| filters: |
| branches: |
| only: master |