website/.gitlab-ci.yml
Andrei Jiroh Halili 4df05ae9c4 chore(global): usual commit-them-all to avoid data loss
Gonna start over on the workspace due to technical diffculties.

Signed-off-by: Andrei Jiroh Halili <ajhalili2006@gmail.com>
2023-05-05 09:24:28 +00:00

101 lines
2.2 KiB
YAML

image:
name: dock.mau.dev/ajhalili2006/tildeverse-web/build-ci:commit-a9761cf4f2f1b8298f69aaaa07e0a577329a17d6
entrypoint:
- /bin/bash
variables:
DEBUG: "1"
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 && mkdir /run/secrets
- 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
tags:
- amd64
stages:
- build
- lint
- deploy
build:mr:
extends: [ .setupkit ]
stage: build
script:
- bash ./bin/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' && $CI_PIPELINE_SOURCE == "merge_request"
changes:
- mkdocs.yml
- markdown/*
- markdown/**/*
- .gitlab-ci.yml
- docker/Dockerfile
- package*.json
- .trigger-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/**/*
- .gitlab-ci.yml
- docker/Dockerfile
- package*.json
- .trigger-deploy
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/**/*
- .gitlab-ci.yml
- docker/Dockerfile
- package*.json
- .trigger-deploy