Skip to content

Commit 5938267

Browse files
committed
CircleCI CD
1 parent b646e00 commit 5938267

File tree

5 files changed

+70
-33
lines changed

5 files changed

+70
-33
lines changed

.circleci/config.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
version: 2.1
2+
3+
orbs:
4+
python: circleci/python@0.2.1
5+
6+
workflows:
7+
default_workflow:
8+
jobs:
9+
- build:
10+
filters:
11+
branches:
12+
only:
13+
- master
14+
15+
jobs:
16+
build:
17+
docker:
18+
# specify the version you desire here
19+
# use `-browsers` prefix for selenium tests, e.g. `3.6.1-browsers`
20+
- image: circleci/python:3.7
21+
22+
# Specify service dependencies here if necessary
23+
# CircleCI maintains a library of pre-built images
24+
# documented at https://circleci.com/docs/2.0/circleci-images/
25+
# - image: circleci/postgres:9.4
26+
27+
working_directory: ~/repo
28+
29+
steps:
30+
- checkout
31+
32+
# Download and cache dependencies
33+
- restore_cache:
34+
keys:
35+
- v1-dependencies-{{ checksum "requirements.txt" }}
36+
# fallback to using the latest cache if no exact match is found
37+
- v1-dependencies-
38+
39+
- run:
40+
name: install dependencies
41+
command: |
42+
python3 -m venv venv
43+
. venv/bin/activate
44+
pip install --upgrade pip && pip install -r requirements.txt
45+
46+
- save_cache:
47+
paths:
48+
- ./venv
49+
key: v1-dependencies-{{ checksum "requirements.txt" }}
50+
51+
# run tests!
52+
# this example uses Django's built-in test-runner
53+
# other common Python testing frameworks include pytest and nose
54+
# https://pytest.org
55+
# https://nose.readthedocs.io
56+
- deploy:
57+
name: "Deploy docs"
58+
command: |
59+
git clone --branch=master --depth=1 "https://$USER_NAME:$GITHUB_TOKEN@github.com/$USER_NAME/$CIRCLE_PROJECT_REPONAME.git" deploy && cd deploy
60+
git clone --branch=gh-pages --depth=1 "https://$USER_NAME:$GITHUB_TOKEN@github.com/$USER_NAME/$CIRCLE_PROJECT_REPONAME.git" site
61+
. ../venv/bin/activate
62+
mkdocs build
63+
cd site
64+
git config user.name "$USER_NAME"
65+
git config user.email "$USER_EMAIL"
66+
git add --all
67+
git commit -m "Deploy $CIRCLE_BUILD_NUM from CircleCI [skip ci]"
68+
git push origin gh-pages

netlify.toml

Lines changed: 0 additions & 9 deletions
This file was deleted.

poetry.toml

Lines changed: 0 additions & 2 deletions
This file was deleted.

pyproject.toml

Lines changed: 0 additions & 21 deletions
This file was deleted.

requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ mkdocs-material==5.0.0rc4
33
Pygments>=2.4
44
markdown>=3.2
55
pymdown-extensions>=7.0b2
6-
mkdocs-redirects==1.0.0
6+
mkdocs-redirects==1.0.0
7+
git+git://github.com/cmitu/mkdocs-altlink-plugin/

0 commit comments

Comments
 (0)