Skip to content

Commit

Permalink
WIP: CircleCI doc building
Browse files Browse the repository at this point in the history
  • Loading branch information
NelsonVides committed Dec 3, 2020
1 parent b77fe78 commit f5d7c84
Showing 1 changed file with 47 additions and 1 deletion.
48 changes: 47 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ orbs:
tools/circleci-prepare-log-dir.sh
if [ -n "${AWS_SECRET_ACCESS_KEY}" ]; then tools/circleci-upload-to-s3.sh; fi
package:
parallelism: 1
machine:
Expand All @@ -179,6 +178,7 @@ orbs:
name: Build package
command: |
KEEP_COVER_RUNNING=1 ./tools/travis-test.sh -p pkg -s false
big_tests:
parallelism: 1
machine:
Expand Down Expand Up @@ -261,6 +261,7 @@ orbs:
command: |
tools/circleci-prepare-log-dir.sh
if [ -n "${AWS_SECRET_ACCESS_KEY}" ]; then tools/circleci-upload-to-s3.sh; fi
docker_image:
parallelism: 1
machine:
Expand All @@ -287,6 +288,46 @@ orbs:
name: Execute Docker image build and upload
command: tools/circle-build-and-push-docker.sh

jobs:
docs_build_deploy:
parallelism: 1
docker:
- image: cimg/python:3.9.0
working_directory: ~/app
steps:
- checkout
- run:
name: Test that docs build
command: |
pip3 install mkdocs
pip3 install mkdocs-material
mkdocs build --strict
- when:
condition:
or:
- equal: [ master, << pipeline.git.branch >> ]
- << pipeline.git.tag >>
steps:
- add_ssh_keys:
fingerprints:
- "${GH_DEPLOY_KEY}"
- run:
name: Generate image tag
command: |
set -x
if [ -n "$CIRCLE_TAG" ]; then
DOCS_TAG="$CIRCLE_TAG"
elif [ "$CIRCLE_BRANCH" == "master" ]; then
DOCS_TAG="latest"
else
DOCS_TAG=`echo $CIRCLE_BRANCH | sed 's,/,_,g'`
fi
- run:
name: Build latest
command: |
pip3 install mike
mike deploy $DOCS_TAG --remote [email protected]:esl/MongooseDocs.git --branch main --push --force
filters: &all_tags
tags:
only: /^\d+\.\d+\.\d+([a-z0-9\-\+])*/
Expand Down Expand Up @@ -457,3 +498,8 @@ workflows:
- small_tests_21_3
- small_tests_23
filters: *all_tags
# ============= DOCUMENTATION =============
- docs_build_deploy:
name: build_and_deploy_docs
context: mongooseim-org
filters: *all_tags

0 comments on commit f5d7c84

Please sign in to comment.