-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy path.gitlab-ci.yml
64 lines (58 loc) · 1.34 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
workflow:
rules:
- if: $CI_COMMIT_BRANCH
variables:
S3_STATIC_BUCKET: python-geogebra
PYGGB_HOSTED_BASE_PATH: python
stages:
- build-dependencies
- build
- release
build-examples:
stage: build-dependencies
tags:
- docker
image: python:3.13-alpine
script:
- python3 tools/build_examples_index.py ./public/examples > ./public/examples/index.json
artifacts:
paths:
- public/examples/index.json
build-docs:
stage: build-dependencies
tags:
- docker
image: python:3.13-alpine
before_script:
- apk --no-cache add curl make
script:
- curl -sSL https://install.python-poetry.org | python3 -
- POETRY=$HOME/.local/bin/poetry
- ( cd doc && $POETRY install && $POETRY run make html )
- mv doc/build/html public/doc
artifacts:
paths:
- public/doc/
build:
stage: build
tags:
- docker
image: node:18.16-alpine
before_script:
- npm clean-install
script:
- export PUBLIC_URL=/${PYGGB_HOSTED_BASE_PATH}
- export REACT_APP_DOCS_BASE_URL_WITHIN_APP=doc
- npm run build
artifacts:
paths:
- build/
publish:
stage: release
tags:
- amd
image: registry.gitlab.com/gitlab-org/cloud-deploy/aws-base:latest
script:
- aws s3 sync ./build s3://${S3_STATIC_BUCKET}/${PYGGB_HOSTED_BASE_PATH}
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH