You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.2 KiB
YAML
50 lines
1.2 KiB
YAML
gendoc: &gendoc
|
|
name: Generate the docs
|
|
command: |
|
|
source /env/bin/activate
|
|
scripts/gendoc.py
|
|
|
|
gendoc: &genswagger
|
|
name: Generate the swagger
|
|
command: |
|
|
source /env/bin/activate
|
|
scripts/dump-swagger.py
|
|
|
|
version: 2
|
|
jobs:
|
|
build-docs:
|
|
docker:
|
|
- image: uhoreg/matrix-doc-build
|
|
steps:
|
|
- checkout
|
|
- run: *gendoc
|
|
- store_artifacts:
|
|
path: scripts/gen
|
|
- run:
|
|
name: "Doc build is available at:"
|
|
command: DOCS_URL="${CIRCLE_BUILD_URL}/artifacts/${CIRCLE_NODE_INDEX}/${CIRCLE_WORKING_DIRECTORY/#\~/$HOME}/scripts/gen/index.html"; echo $DOCS_URL
|
|
|
|
build-swagger:
|
|
docker:
|
|
- image: uhoreg/matrix-doc-build
|
|
steps:
|
|
- checkout
|
|
- run: *genswagger
|
|
- store_artifacts:
|
|
path: scripts/swagger/api-docs.json
|
|
- run:
|
|
name: "Swagger UI is available at:"
|
|
command: SWAGGER_URL="${CIRCLE_BUILD_URL}/artifacts/${CIRCLE_NODE_INDEX}/${CIRCLE_WORKING_DIRECTORY/#\~/$HOME}/scripts/swagger/api-docs.json"; echo "https://matrix.org/docs/api/client-server/?url="$SWAGGER_URL
|
|
|
|
workflows:
|
|
version: 2
|
|
|
|
build-spec:
|
|
jobs:
|
|
- build-docs
|
|
- build-swagger
|
|
|
|
notify:
|
|
webhooks:
|
|
- url: https://giles.cadair.com/circleci
|