This question is about how to deploy multiple reveal.js presentations on GitLab pages, originating from one repository.
Summary
I'm quite new to reveal.js and playing around with integration to GitLab, deploying a presentation to GitLab pages. In my repo, I'm hosting my themes and presentations (all in one repo). I can deploy one presentation from one branch. Next goal is to host all/multiple (public) presentations at the same time with GitLab pages.
Setup
- In my repository each presentation (reveal.js from here) is sitting in one branch. There are also theme based branches that are just for keeping the record. For the example assume there are two presentations, sitting in
/2020/pres1
and/2020/pres2
. (Setup was adapted from Elmiko ). In the first presentation branch, a
.gitlab-ci.yml
file is sitting, which is deploying the first presentation tousername.gitlab.io/repo-name/
This is working fine..gitlab-ci.yml
:
pages:
stage: deploy
script:
- mkdir .public
- cp -r * .public
- mv .public public
artifacts:
paths:
- public
only:
- 2020/pres1
- To my understanding, adding a second, identical file, adapted for
pres2
it the2020/pres2
branch would 'overwrite' the deployed first page.
Question
What alterations have to be made on the yml files to achieve the following result?
- Presentations are hosted at
username.gitlab.io/repo-name/year/branch
. - In this example the presentations would be reached at:
username.gitlab.io/repo-name/2020/pres1
andusername.gitlab.io/repo-name/2020/pres2
Thanks in advance for your advice.