From 967bce0360e94e01c587d87578857b2b70b04fd6 Mon Sep 17 00:00:00 2001 From: Simon Rose Date: Wed, 19 Aug 2026 15:37:08 +0200 Subject: [PATCH 1/5] Convert CI to github format for pages deployment --- .github/workflows/docs.yml | 59 ++++++++++++++++++++++++++++++++++++++ .gitlab-ci.yml | 29 ------------------- 2 files changed, 59 insertions(+), 29 deletions(-) create mode 100644 .github/workflows/docs.yml delete mode 100644 .gitlab-ci.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..79064d6 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,59 @@ +--- +name: Docs + +on: + push: + branches: + - main + pull_request: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + contents: read + +jobs: + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + - uses: actions/setup-python@v7 + with: + python-version: "3.11" + - uses: pre-commit/action@v3.0.1 + + build: + runs-on: ubuntu-latest + defaults: + # This is necessary due to the use of the setup-miniconda action below. See their documentation + # at https://github.com/conda-incubator/setup-miniconda#usage-examples + run: + shell: bash -el {0} + steps: + - uses: actions/checkout@v7 + - uses: actions/setup-python@v7 + with: + python-version: "3.12" + - uses: conda-incubator/setup-miniconda@v4 + with: + environment-file: environment.yml + - run: sphinx-build -M html src build -W --keep-going + - uses: actions/upload-pages-artifact@v5 + with: + path: build/html + + deploy: + needs: build + if: github.ref == 'refs/heads/main' + runs-on: ubuntu-latest + permissions: + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - id: deployment + uses: actions/deploy-pages@v5 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 696e79c..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,29 +0,0 @@ ---- -default: - tags: - - docker - -include: - - project: "ics-infrastructure/gitlab-ci-yml" - file: "PreCommit.gitlab-ci.yml" - -stages: [check, build, deploy] - -build: - stage: build - image: registry.esss.lu.se/ics-docker/sphinx - script: - - sphinx-build -M html src build -W --keep-going - artifacts: - paths: - - build - -pages: - stage: deploy - script: - - mv build/html public - artifacts: - paths: - - public - rules: - - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' From 1976df370c5f53d2259c1eabfcac4805804153b6 Mon Sep 17 00:00:00 2001 From: Simon Rose Date: Wed, 19 Aug 2026 15:54:28 +0200 Subject: [PATCH 2/5] Change intersphinx mapping to point away from e3.pages --- src/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conf.py b/src/conf.py index b615d8c..6d38518 100644 --- a/src/conf.py +++ b/src/conf.py @@ -101,7 +101,7 @@ intersphinx_mapping = { "python": ("https://docs.python.org/3/", None), - "e3": ("https://e3.pages.ess.eu/", None), + "e3": ("https://epics-e3.github.io/", None), "epics": ("https://docs.epics-controls.org/en/latest/", None), } From 2ddaf09b58458afdd1124e7c1dfe49fcfdc4e825 Mon Sep 17 00:00:00 2001 From: Simon Rose Date: Mon, 24 Aug 2026 15:47:47 +0200 Subject: [PATCH 3/5] Remove gitlab-specific configuration in conf.py --- src/conf.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/conf.py b/src/conf.py index 6d38518..d6c0cbc 100644 --- a/src/conf.py +++ b/src/conf.py @@ -14,9 +14,11 @@ # The full version, including alpha/beta/rc tags try: - # CI_COMMIT_REF_NAME is defined by GitLab Runner - # The branch or tag name for which project is built - release = os.environ["CI_COMMIT_REF_NAME"] + # GITHUB_REF_NAME is defined by a github runner, and is + # the branch or tag name for which project is built + # + # See https://docs.github.com/en/actions/reference/workflows-and-actions/variables + release = os.environ["GITHUB_REF_NAME"] except KeyError: # Fallback in dev mode release = os.popen("git describe").read().strip() @@ -56,16 +58,14 @@ html_theme_options = { "navigation_with_keys": True, "top_of_page_button": "edit", - "source_repository": "https://gitlab.esss.lu.se/e3/e3.pages.ess.eu", + "source_repository": "https://github.com/epics-e3/epics-e3.github.io", "source_branch": "main", "source_directory": "src/", - "source_edit_link": "https://gitlab.esss.lu.se/e3/e3.pages.ess.eu/-/edit/main/src/{filename}", - "source_view_link": "https://gitlab.esss.lu.se/e3/e3.pages.ess.eu/-/blob/main/src/{filename}", "sidebar_hide_name": False, "footer_icons": [ { - "name": "GitLab", - "url": "https://gitlab.esss.lu.se/e3/e3.pages.ess.eu", + "name": "GitHub", + "url": "https://github.com/epics-e3/epics-e3.github.io", "html": "", "class": "", }, From 2586bc21343b9d167f15f30da2ee059e49029294 Mon Sep 17 00:00:00 2001 From: Simon Rose Date: Mon, 24 Aug 2026 15:55:35 +0200 Subject: [PATCH 4/5] Updated README --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 126475f..e8689e7 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,6 @@ # e3 documentation -Source for e3 documentation hosted on GitLab pages: https://e3.pages.ess.eu - -The URL relies on this project's path, see https://docs.gitlab.com/user/project/pages/getting_started_part_one/#gitlab-pages-default-domain-names. +Source for e3 documentation hosted on GitHub pages: https://epics-e3.github.io The documentation is built using [Sphinx](http://www.sphinx-doc.org/en/master/index.html) and From 14e731e00ca7aefbfe9c5b88018b8da16d956da8 Mon Sep 17 00:00:00 2001 From: Simon Rose Date: Mon, 24 Aug 2026 16:00:18 +0200 Subject: [PATCH 5/5] Remove -W flag to allow initial build to happen --- .github/workflows/docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 79064d6..64c43d5 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -39,7 +39,7 @@ jobs: - uses: conda-incubator/setup-miniconda@v4 with: environment-file: environment.yml - - run: sphinx-build -M html src build -W --keep-going + - run: sphinx-build -M html src build - uses: actions/upload-pages-artifact@v5 with: path: build/html