Skip to content
Snippets Groups Projects
Commit 05b8921a authored by Riccardo Boero's avatar Riccardo Boero :innocent:
Browse files

Update .gitlab-ci.yml

parent ee98e831
No related branches found
No related tags found
No related merge requests found
......@@ -3,11 +3,14 @@ image: julia:latest
stages:
- documentation
- deploy
- register
# Existing jobs for documentation and pages
# Documentation stage
build documentation:
stage: documentation
script:
- julia --project=. -e 'using Pkg; Pkg.Registry.add(Pkg.RegistrySpec(url="https://github.com/JuliaRegistries/General.git"))'
- julia --project=. -e 'using Pkg; Pkg.Registry.add(url="https://git.nilu.no/julia/registry")'
- julia --project=. -e 'using Pkg; Pkg.instantiate()'
- julia --project=. docs/make.jl
artifacts:
......@@ -17,6 +20,7 @@ build documentation:
only:
- main
# Deploy stage for GitLab Pages
pages:
stage: deploy
script:
......@@ -27,4 +31,43 @@ pages:
only:
- main
register package:
stage: register
before_script:
# Install git
- apt-get update && apt-get install -y git
# Ensure we're in the package root directory
- cd $CI_PROJECT_DIR
# Clone the registry repository
- git clone https://${REGISTRY_TOKEN}@git.nilu.no/julia/registry.git /tmp/registry
# Set Git user name and email
- git config --global user.name "Registry Bot"
- git config --global user.email "bot@git.nilu.no"
script:
# Use a temporary Julia environment for LocalRegistry
- julia -e '
using Pkg;
Pkg.activate(temp=true);
Pkg.add("LocalRegistry");
using LocalRegistry;
LocalRegistry.register(
registry = "/tmp/registry",
commit = true,
push = false,
ignore_reregistration = false,
allow_package_dirty = true
);
'
# Push changes to the registry
- |
cd /tmp/registry
git push https://gitlab-ci-token:$REGISTRY_TOKEN@git.nilu.no/julia/registry.git main
only:
- tags
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment