|
| 1 | +# Python CircleCI 2.0 configuration file |
| 2 | +# |
| 3 | +# Check https://circleci.com/docs/2.0/language-python/ for more details |
| 4 | +# |
| 5 | +version: 2 |
| 6 | +jobs: |
| 7 | + build: |
| 8 | + resource_class: xlarge |
| 9 | + docker: |
| 10 | + # a packaged system that has the instructions for creating a running container. |
| 11 | + - image: circleci/ruby:2.4-node |
| 12 | + |
| 13 | + # Specify service dependencies here if necessary |
| 14 | + # CircleCI maintains a library of pre-built images |
| 15 | + # documented at https://circleci.com/docs/2.0/circleci-images/ |
| 16 | + # - image: circleci/postgres:9.4 |
| 17 | + |
| 18 | + working_directory: ~/Plotly/documentation |
| 19 | + |
| 20 | + # actions that need to be taken to perform your job |
| 21 | + steps: |
| 22 | + - add_ssh_keys: |
| 23 | + fingerprints: |
| 24 | + - "SHA256:USaw9IC3qDmo5lTDeDE1ctu2VeLlrFbqhYZrPVJlw2U" |
| 25 | + |
| 26 | + # checks out the source code for a job over SSH |
| 27 | + - checkout |
| 28 | + |
| 29 | + # Download and cache dependencies |
| 30 | + - restore_cache: |
| 31 | + keys: |
| 32 | + - v1-dependencies-{{ checksum "requirements.txt" }} |
| 33 | + # fallback to using the latest cache if no exact match is found |
| 34 | + - v1-dependencies- |
| 35 | + |
| 36 | + - run: |
| 37 | + name: install dependencies |
| 38 | + command: | |
| 39 | + ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" |
| 40 | + brew install gnupg |
| 41 | + host pool.sks-keyservers.net |
| 42 | + gpg --keyserver hkp://95.216.167.177 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB |
| 43 | +
|
| 44 | + npm install electron@1.8.4 orca |
| 45 | + pip install -r requirements.txt |
| 46 | + sudo apt-get install -y poppler-utils libxtst6 xvfb libgtk2.0-0 libgconf-2-4 libnss3 libasound2 |
| 47 | +
|
| 48 | + # Caches dependencies with a cache key |
| 49 | + - save_cache: |
| 50 | + paths: |
| 51 | + - ./node_modules |
| 52 | + key: v1-dependencies-{{ checksum "requirements.txt" }} |
| 53 | + |
| 54 | + - run: |
| 55 | + name: make html |
| 56 | + command: | |
| 57 | + make -kj8 || make -kj8 |
| 58 | + if [ "${CIRCLE_BRANCH}" == "source-design-merge" ]; then |
| 59 | + cd build/html |
| 60 | + git init |
| 61 | + git config user.name mahdis-z |
| 62 | + git config user.email maahhddiiss@gmail.com |
| 63 | + git add * |
| 64 | + git commit -m build |
| 65 | + git push --force git@github.com:plotly/documentation.git source-design-merge:built |
| 66 | + rm -rf .git |
| 67 | + cd ../.. |
| 68 | + fi |
| 69 | + |
| 70 | +
|
| 71 | + - store_artifacts: |
| 72 | + path: build |
| 73 | + destination: build |
0 commit comments