-
Notifications
You must be signed in to change notification settings - Fork 6
/
.gitlab-ci.yml
47 lines (42 loc) · 944 Bytes
/
.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
workflow:
rules:
- if: $CI_COMMIT_BRANCH
variables:
S3_STATIC_BUCKET: python-geogebra
PYGGB_HOSTED_BASE_PATH: python
stages:
- build-examples
- build
- release
build-examples:
stage: build-examples
tags:
- docker
image: python:3.11.3-alpine3.17
script:
- python3 tools/build_examples_index.py ./public/examples > ./public/examples/index.json
artifacts:
paths:
- public/examples/index.json
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
build:
stage: build
tags:
- docker
image: node:18.16-alpine
before_script:
- npm clean-install
script:
- PUBLIC_URL=/${PYGGB_HOSTED_BASE_PATH} npm run build
artifacts:
paths:
- build
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
publish:
stage: release
script:
- aws s3 sync ./build s3://${S3_STATIC_BUCKET}/${PYGGB_HOSTED_BASE_PATH}
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH