2023-07-13 18:13:07 +00:00
|
|
|
# The Docker image that will be used to build your app
|
2023-10-18 15:40:47 +00:00
|
|
|
image:
|
|
|
|
name: quay.io/ajhalili2006/mkdocs-material-build-ci:latest
|
2023-07-13 18:13:07 +00:00
|
|
|
|
2023-07-15 16:22:08 +00:00
|
|
|
stages:
|
2023-10-01 00:33:49 +00:00
|
|
|
- test
|
2023-07-15 16:22:08 +00:00
|
|
|
- build
|
2023-10-10 06:50:58 +00:00
|
|
|
- sync-repo
|
2023-03-24 18:26:22 +00:00
|
|
|
|
2023-07-15 16:22:08 +00:00
|
|
|
default:
|
|
|
|
tags:
|
|
|
|
- amd64 # currently, we only the image in amd64 right now.
|
|
|
|
# Functions that should be executed before the build script is run
|
|
|
|
before_script:
|
2023-10-10 06:50:58 +00:00
|
|
|
- pipenv install --ignore-pipfile --deploy
|
2023-07-15 16:22:08 +00:00
|
|
|
- npm ci
|
|
|
|
- curl --silent "https://gitlab.com/gitlab-org/incubation-engineering/mobile-devops/download-secure-files/-/raw/main/installer" | bash
|
2023-10-01 00:33:49 +00:00
|
|
|
|
2023-07-15 16:22:08 +00:00
|
|
|
# Global builds and stuff
|
2023-03-27 15:29:38 +00:00
|
|
|
variables:
|
2023-10-01 00:33:49 +00:00
|
|
|
DEBUG: "1" # MAY HORRIBLY LEAK SECRETS, PROCEED WITH CAUTION
|
2023-03-27 15:29:38 +00:00
|
|
|
FF_ENABLE_COMMIT_DATA: "true"
|
|
|
|
FF_GENERATE_SOCIAL_CARDS: "true"
|
|
|
|
SECURE_FILES_DOWNLOAD_PATH: /run/secrets
|
2023-07-16 16:21:47 +00:00
|
|
|
GIT_DEPTH: "0"
|
2023-03-24 18:26:22 +00:00
|
|
|
|
2023-07-13 18:13:07 +00:00
|
|
|
pages:
|
2023-07-15 16:22:08 +00:00
|
|
|
stage: build
|
2023-03-24 18:26:22 +00:00
|
|
|
script:
|
2023-07-14 17:26:31 +00:00
|
|
|
- doppler run -- ./bin/deploykit-pages.sh
|
2023-03-24 18:26:22 +00:00
|
|
|
artifacts:
|
|
|
|
paths:
|
2023-07-13 18:13:07 +00:00
|
|
|
# The folder that contains the files to be exposed at the Page URL
|
2023-03-24 18:26:22 +00:00
|
|
|
- public
|
2023-07-14 17:26:31 +00:00
|
|
|
variables:
|
|
|
|
CF_PAGES_PROJECT_NAME: ajhalili2006
|
2023-03-27 15:29:38 +00:00
|
|
|
rules:
|
2023-07-13 18:13:07 +00:00
|
|
|
# This ensures that only pushes to the default branch will trigger
|
|
|
|
# a pages deploy
|
|
|
|
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
|
2023-10-08 02:09:10 +00:00
|
|
|
.pages:srht:
|
2023-07-15 16:22:08 +00:00
|
|
|
stage: build
|
|
|
|
needs:
|
|
|
|
- pages
|
|
|
|
script:
|
2023-07-15 16:49:46 +00:00
|
|
|
- doppler run -- ./bin/deploykit-gmi.sh
|
2023-07-15 16:22:08 +00:00
|
|
|
rules:
|
2023-09-30 17:41:23 +00:00
|
|
|
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
|
2023-10-10 06:50:58 +00:00
|
|
|
|
|
|
|
# TODO: Automate this over at mirrors/cronjobs soon.
|
|
|
|
sync-branch:
|
|
|
|
stage: sync-repo
|
|
|
|
script:
|
|
|
|
- |
|
|
|
|
set -x
|
|
|
|
eval $(ssh-agent)
|
|
|
|
ssh-add /run/secrets/passwordless
|
|
|
|
git push "git@github.com:ajhalili2006/ajhalili2006.github.io" --mirror || true
|
|
|
|
git push "git@git.sr.ht:~ajhalili2006/web" --mirror || true
|
2023-10-18 15:40:47 +00:00
|
|
|
git push "git@codeberg.org:ajhalili2006/website" --mirror || true
|