Skip to content

Commit 1f78c86

Browse files
committed
wip
1 parent 7da938a commit 1f78c86

File tree

14 files changed

+1391
-507
lines changed

14 files changed

+1391
-507
lines changed

.github/workflows/docs.yml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: Publish Documentation to sites.ecmwf.int
2+
on:
3+
pull_request:
4+
types: [opened, synchronize, reopened, closed]
5+
push:
6+
branches:
7+
- 'develop'
8+
- 'master'
9+
tags:
10+
- '**'
11+
jobs:
12+
build:
13+
if: ${{ github.event_name == 'pull_request' && github.event.action != 'closed' || github.event_name == 'push'}}
14+
runs-on: ubuntu-latest
15+
outputs:
16+
artifact-id: ${{ steps.upload-doc.outputs.artifact-id }}
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
- name: Setup Python
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: '3.13'
24+
- name: Install python dependencies
25+
run: |
26+
python -m pip install -r docs/requirements.txt
27+
- name: Prepare Doxygen
28+
uses: ecmwf/reusable-workflows/setup-doxygen@main
29+
with:
30+
version: 1.14.0
31+
- name: Build doc
32+
run: |
33+
cd docs
34+
make -j html
35+
- name: Archive documentation
36+
id: upload-doc
37+
uses: actions/upload-artifact@v4
38+
with:
39+
name: documentation
40+
path: docs/_build/html
41+
preview-publish:
42+
if: ${{ github.event_name == 'pull_request' && github.event.action != 'closed' }}
43+
needs: build
44+
uses: ecmwf/reusable-workflows/.github/workflows/pr-preview-publish.yml@main
45+
with:
46+
artifact-id: ${{ needs.build.outputs.artifact-id }}
47+
space: docs
48+
name: dev-section
49+
path: eckit/pull-requests
50+
link-text: 🌦️ >> Documentation << 🌦️
51+
secrets:
52+
sites-token: ${{ secrets.ECMWF_SITES_DOCS_DEV_SECTION_TOKEN }}
53+
preview-unpublish:
54+
if: ${{ github.event_name == 'pull_request' && github.event.action == 'closed' }}
55+
uses: ecmwf/reusable-workflows/.github/workflows/pr-preview-unpublish.yml@main
56+
with:
57+
space: docs
58+
name: dev-section
59+
path: eckit/pull-requests
60+
secrets:
61+
sites-token: ${{ secrets.ECMWF_SITES_DOCS_DEV_SECTION_TOKEN }}
62+
publish:
63+
if: >-
64+
${{ github.event_name == 'push' && (
65+
github.ref_name == 'develop' ||
66+
github.ref_name == 'master' ||
67+
github.ref_type == 'tag'
68+
) }}
69+
needs: build
70+
uses: ecmwf/reusable-workflows/.github/workflows/docs-publish.yml@main
71+
with:
72+
artifact-id: ${{ needs.build.outputs.artifact-id }}
73+
space: docs
74+
name: dev-section
75+
path: eckit
76+
id: ${{ github.ref_name }}
77+
softlink: ${{ github.ref_name == 'master' && 'stable'
78+
|| github.ref_name == 'develop' && 'latest' }}
79+
secrets:
80+
sites-token: ${{ secrets.ECMWF_SITES_DOCS_DEV_SECTION_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ doc/latex
1010
.vscode
1111
.idea
1212
build/
13+
_build
1314
*.ccls-cache

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ set( PERSISTENT_NAMESPACE "eckit" CACHE INTERNAL "" ) # needed for generating .b
371371

372372
add_subdirectory( src )
373373
add_subdirectory( bamboo )
374-
add_subdirectory( doc )
374+
#add_subdirectory( docs )
375375
add_subdirectory( share )
376376
add_subdirectory( tests )
377377
add_subdirectory( regressions )

docs/.flake8

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[flake8]
2+
max-line-length = 120
3+
extend-ignore = E203

doc/CMakeLists.txt renamed to docs/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@ ecbuild_add_option(
55

66
if( HAVE_DOCS )
77

8-
set( ECKIT_DOC eckit_doc )
8+
set( ECKIT_DOC eckit-doc )
99
if( PROJECT_NAME STREQUAL CMAKE_PROJECT_NAME )
1010
set( ECKIT_DOC doc )
1111
endif()
1212

1313
set( DOXYFILE Doxyfile CACHE INTERNAL "Doxygen filename" )
14-
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${DOXYFILE}.in "${CMAKE_CURRENT_BINARY_DIR}/${DOXYFILE}" @ONLY )
1514
add_custom_target( ${ECKIT_DOC}
1615
COMMAND doxygen ${CMAKE_CURRENT_BINARY_DIR}/${DOXYFILE}
1716
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} )

0 commit comments

Comments
 (0)