| { |
| "image": "alpine:3", |
| "stages": [ |
| "test", "deploy" |
| ], |
| "run test": { |
| "stage": "test", |
| "script": [ |
| "apk add file", |
| "apk add python3", |
| "env", |
| "pwd", |
| "cd code && python -m unittest" |
| ] |
| }, |
| "pages": { |
| "stage": "deploy", |
| "script": [ |
| "apk add python3 py3-pip", |
| "env | sort", |
| "pwd", |
| "python3 -m venv venv", |
| ". venv/bin/activate", |
| "pip install -U sphinx", |
| "sphinx-build -N -d sphinx-crud -a man public" |
| ], |
| "artifacts": { |
| "paths": [ "public" ] |
| }, |
| "rules": [ |
| { "if": "$CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH" } |
| ] |
| } |
| } |