1
0
mirror of https://gitlab.com/Anson-Projects/projects.git synced 2025-08-02 19:41:38 +00:00

Add container for speedier development and builds

This commit is contained in:
2024-03-03 04:17:01 +00:00
parent 8cba29090e
commit 46e0190668
4 changed files with 40 additions and 43 deletions

View File

@@ -1,25 +1,27 @@
image: ghcr.io/quarto-dev/quarto-full:1.5.22
stages:
- build
- deploy
build_project:
build:master:
stage: build
image:
name: gcr.io/kaniko-project/executor:v1.21.0-debug
entrypoint: [""]
script:
- apt-get update
- apt-get -y install --no-install-recommends apt-utils dialog 2>&1
- apt-get -y install git iproute2 procps lsb-release
- apt-get -y install python3 python3-pip
- apt-get -y install r-base
- apt-get -y install julia
- python3 -m pip install jupyter
- julia -e "using Pkg; Pkg.instantiate(); Pkg.precompile()"
- cp Project.toml /root/.julia/environments/v1.4/Project.toml
- cp Manifest.toml /root/.julia/environments/v1.4/Manifest.toml
- julia -e "using Pkg; Pkg.instantiate(); Pkg.precompile()"
- echo "Building the project with Quarto..."
- quarto render --to html --output-dir public
- /kaniko/executor
--context "${CI_PROJECT_DIR}"
--dockerfile "${CI_PROJECT_DIR}/Dockerfile"
--destination "${CI_REGISTRY_IMAGE}:${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME}"
--destination "${CI_REGISTRY_IMAGE}:latest"
rules:
- if: '$CI_COMMIT_BRANCH == "master"'
render-quarto:
stage: deploy
image: ${CI_REGISTRY_IMAGE}:latest
script:
- echo "Building the project with Quarto..."
- quarto render --to html --output-dir public
artifacts:
paths:
- public
@@ -29,7 +31,7 @@ pages:
script:
- echo "Publishing site..."
dependencies:
- build_project
- render-quarto
artifacts:
paths:
- public