mirror of
https://mau.dev/andreijiroh-dev/website.git
synced 2024-09-19 23:57:04 +00:00
Andrei Jiroh Halili
eab9ae94a6
Also in this commit, we improved the build script to use the virtualenv setup we did to isolate dependencies from the rest of the build system. We also did some adjustments on caching deps to speed up the CI. Signed-off-by: Andrei Jiroh Halili <ajhalili2006@gmail.com>
63 lines
No EOL
1.3 KiB
YAML
63 lines
No EOL
1.3 KiB
YAML
image:
|
|
name: dock.mau.dev/ajhalili2006/tildeverse-web/build-ci
|
|
entrypoint:
|
|
- sh
|
|
|
|
variables:
|
|
FF_ENABLE_COMMIT_DATA: "true"
|
|
FF_GENERATE_SOCIAL_CARDS: "true"
|
|
SECURE_FILES_DOWNLOAD_PATH: /run/secrets
|
|
|
|
.setupkit:
|
|
before_script:
|
|
- apk add curl gnupg bash coreutils
|
|
- curl --silent "https://gitlab.com/gitlab-org/incubation-engineering/mobile-devops/download-secure-files/-/raw/main/installer" | bash
|
|
- (curl -Ls --tlsv1.2 --proto "=https" --retry 3 https://cli.doppler.com/install.sh || wget -t 3 -qO- https://cli.doppler.com/install.sh) | sh
|
|
|
|
stages:
|
|
- build
|
|
- lint
|
|
- deploy
|
|
|
|
build:main:
|
|
extends: [ .setupkit ]
|
|
stage: build
|
|
script:
|
|
- bash ./build.sh
|
|
artifacts:
|
|
paths:
|
|
- public
|
|
untracked: false
|
|
when: on_success
|
|
expire_in: "21 days"
|
|
cache:
|
|
paths:
|
|
- .cache
|
|
- .venv
|
|
key: pages-build-main
|
|
rules:
|
|
- if: $CI_COMMIT_BRANCH == 'main'
|
|
changes:
|
|
- mkdocs.yml
|
|
- markdown/*
|
|
- markdown/**/*
|
|
|
|
deploy:main:
|
|
stage: deploy
|
|
extends: [ .setupkit ]
|
|
needs:
|
|
- build:main
|
|
script:
|
|
- apk add nodejs-lts npm && npm i
|
|
- ls -Al
|
|
- doppler run -- echo hi
|
|
cache:
|
|
paths:
|
|
- node_modules
|
|
key: deploykit-main
|
|
rules:
|
|
- if: $CI_COMMIT_BRANCH == 'main'
|
|
changes:
|
|
- mkdocs.yml
|
|
- markdown/*
|
|
- markdown/**/* |