| 
1 |  | -# Use the latest 2.1 version of CircleCI pipeline process engine.  | 
2 |  | -# See: https://circleci.com/docs/2.0/configuration-reference  | 
3 | 1 | version: 2.1  | 
4 | 2 | 
 
  | 
5 |  | -# Orbs are reusable packages of CircleCI configuration that you may share across projects, enabling you to create encapsulated, parameterized commands, jobs, and executors that can be used across multiple projects.  | 
6 |  | -# See: https://circleci.com/docs/2.0/orb-intro/  | 
7 |  | -orbs:  | 
8 |  | -  # The python orb contains a set of prepackaged CircleCI configuration you can use repeatedly in your configuration files  | 
9 |  | -  # Orb commands and jobs help you with common scripting around a language/tool  | 
10 |  | -  # so you dont have to copy and paste it everywhere.  | 
11 |  | -  # See the orb documentation here: https://circleci.com/developer/orbs/orb/circleci/python  | 
12 |  | -  python:  circleci/[email protected]  | 
13 |  | - | 
14 |  | -# Define a job to be invoked later in a workflow.  | 
15 |  | -# See: https://circleci.com/docs/2.0/configuration-reference/#jobs  | 
16 | 3 | jobs:  | 
17 |  | -  build-and-test: # This is the name of the job, feel free to change it to better match what you're trying to do!  | 
18 |  | -    # These next lines defines a Docker executors: https://circleci.com/docs/2.0/executor-types/  | 
19 |  | -    # You can specify an image from Dockerhub or use one of the convenience images from CircleCI's Developer Hub  | 
20 |  | -    # A list of available CircleCI Docker convenience images are available here: https://circleci.com/developer/images/image/cimg/python  | 
21 |  | -    # The executor is the environment in which the steps below will be executed - below will use a python 3.8 container  | 
22 |  | -    # Change the version below to your required version of python  | 
 | 4 | +  test:  | 
 | 5 | +    docker:  | 
 | 6 | +      - image: circleci/python:3.8  | 
 | 7 | +    steps:  | 
 | 8 | +      - checkout  | 
 | 9 | +      - run: sudo apt-get install pandoc    | 
 | 10 | +      - run: sudo pip install tox  | 
 | 11 | +      - run: tox  | 
 | 12 | +      - run: ls -la docs  | 
 | 13 | +      - persist_to_workspace:  | 
 | 14 | +          root: docs  | 
 | 15 | +          paths: html  | 
 | 16 | +  docs-deploy:  | 
23 | 17 |     docker:  | 
24 |  | -      - image: cimg/python:3.8  | 
25 |  | -    # Checkout the code as the first step. This is a dedicated CircleCI step.  | 
26 |  | -    # The python orb's install-packages step will install the dependencies from a Pipfile via Pipenv by default.  | 
27 |  | -    # Here we're making sure we use just use the system-wide pip. By default it uses the project root's requirements.txt.  | 
28 |  | -    # Then run your tests!  | 
29 |  | -    # CircleCI will report the results back to your VCS provider.  | 
 | 18 | +      - image: node:16.14.2  | 
30 | 19 |     steps:  | 
31 | 20 |       - checkout  | 
32 |  | -      - python/install-packages:  | 
33 |  | -          pkg-manager: pip-dist  | 
34 |  | -          pip-dependency-file:   | 
 | 21 | +      - attach_workspace:  | 
 | 22 | +          at: docs  | 
 | 23 | +      - run: mkdir -p website/docs && mv docs/html website/docs/  | 
35 | 24 |       - run:  | 
36 |  | -          name: Run pre-commit  | 
37 |  | -          command: pip install pre-commit && pre-commit run --all  | 
 | 25 | +          name: Disable jekyll builds  | 
 | 26 | +          command: touch website/.nojekyll  | 
 | 27 | +      - run: mkdir -p website/.circleci  | 
 | 28 | +      - run: cp .circleci/config.yml website/.circleci/config.yml  | 
38 | 29 |       - run:  | 
39 |  | -          name: Run tests  | 
40 |  | -          # This assumes pytest is installed via the install-package step above  | 
41 |  | -          no_output_timeout: 30m  | 
42 |  | -          command: pip install pytest && pytest tests  | 
43 |  | - | 
44 |  | -# Invoke jobs via workflows  | 
45 |  | -# See: https://circleci.com/docs/2.0/configuration-reference/#workflows  | 
 | 30 | +          name: Install and configure dependencies  | 
 | 31 | +          command: |  | 
 | 32 | +            npm install -g --silent [email protected]  | 
 | 33 | +            git config user.email "$(git log --format=%ae -n 1)"  | 
 | 34 | +            git config user.name "$(git log --format=%an -n 1)"  | 
 | 35 | +      - add_ssh_keys:  | 
 | 36 | +          fingerprints:  | 
 | 37 | +            - "4e:e4:68:5b:4b:62:62:47:73:47:d5:b4:99:23:98:b1"  | 
 | 38 | +      - run:  | 
 | 39 | +          name: Deploy docs to gh-pages branch  | 
 | 40 | +          command: gh-pages -b website --dotfiles --message "$(git log --format=%B -n 1)" --dist website  | 
46 | 41 | workflows:  | 
47 |  | -  sample: # This is the name of the workflow, feel free to change it to better match your workflow.  | 
48 |  | -    # Inside the workflow, you define the jobs you want to run.  | 
 | 42 | +  version: 2  | 
 | 43 | +  build:  | 
49 | 44 |     jobs:  | 
50 |  | -      - build-and-test  | 
 | 45 | +      - test:  | 
 | 46 | +          filters:  | 
 | 47 | +            branches:  | 
 | 48 | +              ignore: website  | 
 | 49 | +      - docs-deploy:  | 
 | 50 | +          requires:  | 
 | 51 | +            - test  | 
 | 52 | +          filters:  | 
 | 53 | +            branches:  | 
 | 54 | +              only: main  | 
0 commit comments