Pluto Pages on gitlab

Hi, to all.
Is there a way to make Pluto pages on gitlab?
I know the github procedure. But I want to move to Gitlab and I really don’t know if this is possible. I’m not really an expert on this.
Thanks

1 Like

GitLab Pages work very similar. Have you checked the GitLab documentation? Could you maybe clarify a bit what part you are struggling with?

From GitLab pages and PkgSkeleton

Edit: added Julia setup and build stage.

After the HTML files are built by PlutoSliderServer.github_action(), move them to the public folder and make it the artifact.

The example .gitlab-ci.yml

image: julia:1.6                # image comes from Docker hub

# Cache modules in between jobs
cache:
  key: ${CI_COMMIT_REF_SLUG}
  paths:
    - pluto_state_cache/

pages:
  stage: deploy
  script:
  - julia -e 'using Pkg;
            Pkg.activate(mktempdir());
            Pkg.add([
              Pkg.PackageSpec(name="PlutoSliderServer", version="0.2"),
            ]);

            import PlutoSliderServer;

            PlutoSliderServer.github_action(;
              Export_cache_dir="pluto_state_cache",
            );'
  - mkdir .public
  - cp -r * .public
  - mv .public public
  artifacts:
    paths:
    - public
  only:
  - main
4 Likes

Yes, I check it out a little bit, but I really don’t know mouch of the procedures to make the CI works

Great i will try it today

1 Like

FYI, here is my testing GitLab repository of pluto notebooks.

It’s working perfect. I only change the last line to
- master
Now
Can we make this a template that is listed on GitLab Pages examples / GitLab Pages examples requests · GitLab ?
what do you think?

1 Like

awesome
As i say before, maybe we can make the inclusion as a template of gitlab. now I’m reading the CONTRIBUTING.md · master · GitLab Pages examples / GitLab Pages examples requests · GitLab to learn the process

1 Like

Yes, please do. I’m also thinking about making a PR to the upstream repo.

Great, I’ll make it today

1 Like

It’s done. I put the issue to make it happen

3 Likes

I made a PR to the upstream and @fonsp suggested turning the GitLab CI/CD part into a separate repository to reduce complexity. And here it is.
It is regularly mirrored to this GitLab repository to run CI/CD. (Of course, one can get the job done using a GitLab repo only, but it might be better to put this project under the JuliaPluto umbrella)

2 Likes

Great! many of this is new to me, I’m a teacher getting involve in all this.
I have to do something with the request to Gitlab. Maybe modify the proyect?

Hi @alvarmaciel feel free to discuss general topics or file an issue to propose code changes and bug fixing for this “root” project. The Gitlab repo is just a mirror of the GitHub one so I disabled the issue section there.

For personal projects holding their pluto notebooks, one can just fork the repo or just copy the .gitlab-ci.yml file to a GitLab repo to get started. And because the repository is under public domain (unlicense), you don’t even have to mention us. (but giving credit is always welcome)