-
Notifications
You must be signed in to change notification settings - Fork 17
114 lines (98 loc) · 3.46 KB
/
docs.yml
File metadata and controls
114 lines (98 loc) · 3.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
name: docs
on:
pull_request:
types: [ opened, synchronize, reopened, closed ]
push:
branches:
- 'develop'
- 'main'
tags:
- '**'
jobs:
# Setup environment and build ecflow documentation
build:
if: ${{ (github.event_name == 'pull_request' && github.event.action != 'closed') || github.event_name == 'push' }}
runs-on: ubuntu-22.04
outputs:
artifact-id: ${{ steps.archivedocs.outputs.artifact-id }}
steps:
- name: Install base dependencies 'boost, qt6, doxygen, python, sphinx, ...'
run: |
sudo apt update
sudo apt install -y \
libboost-all-dev \
libssl-dev \
doxygen \
graphviz \
python3 \
python3-sphinx \
python3-sphinx-rtd-theme
- name: Checkout 'ecbuild'
uses: actions/checkout@v4
with:
repository: ecmwf/ecbuild
path: ecbuild
- name: Checkout 'ecflow'
uses: actions/checkout@v4
with:
path: ecflow
- name: Install documentation python requirements
run: |
python -m pip install -r ecflow/docs/requirements.txt
- name: Configure ecflow
run: |
cmake -S ./ecflow \
-B ./build \
-DENABLE_UI=OFF \
-DENABLE_DOCS=ON \
-DENABLE_STATIC_BOOST_LIBS=OFF \
-DBoost_ROOT=/usr \
-DBoost_INCLUDE_DIR=/usr/include
- name: Build ecflow
run: |
pwd
cmake --build ./build -j 4 --target ecflow_docs
- name: Archive documentation
id: archivedocs
uses: actions/upload-artifact@v4
with:
name: documentation
path: ${{ github.workspace }}/build/docs/_build/html
# Publish the documentation preview for pull requests while they are "ongoing"
preview-publish:
if: ${{ (github.event_name == 'pull_request' && github.event.action != 'closed') || github.event_name == 'push' }}
needs: build
uses: ecmwf/reusable-workflows/.github/workflows/pr-preview-publish.yml@main
with:
artifact-id: ${{ needs.build.outputs.artifact-id }}
space: docs
name: dev-section
path: ecflow/pull-requests
link-text: 🌦️ >> Documentation << 🌦️
secrets:
sites-token: ${{ secrets.ECMWF_SITES_DOCS_DEV_SECTION_TOKEN }}
# Unpublish the documentation preview for pull requests once they are "closed"
preview-unpublish:
if: ${{ github.event_name == 'pull_request' && github.event.action == 'closed' }}
uses: ecmwf/reusable-workflows/.github/workflows/pr-preview-unpublish.yml@main
with:
space: docs
name: dev-section
path: ecflow/pull-requests
secrets:
sites-token: ${{ secrets.ECMWF_SITES_DOCS_DEV_SECTION_TOKEN }}
# Publish the documentation for the 'develop/main' branches, or on tag creation
publish:
if: >-
${{ github.event_name == 'push' && (github.ref_name == 'develop' || github.ref_name == 'main' || github.ref_type == 'tag') }}
needs: build
uses: ecmwf/reusable-workflows/.github/workflows/docs-publish.yml@main
with:
artifact-id: ${{ needs.build.outputs.artifact-id }}
space: docs
name: dev-section
path: ecflow
id: ${{ github.ref_name }}
softlink: ${{ github.ref_name == 'main' && 'stable' || github.ref_name == 'develop' && 'latest' }}
secrets:
sites-token: ${{ secrets.ECMWF_SITES_DOCS_DEV_SECTION_TOKEN }}