@@ -30,13 +30,33 @@ concurrency:
30
30
group : ${{ github.workflow }}-${{ github.ref }}
31
31
32
32
jobs :
33
+ set-meta-releases :
34
+ # read the meta-release versions from the branches.json file
35
+ runs-on : ubuntu-latest
36
+ timeout-minutes : 2
37
+ outputs :
38
+ meta-releases : ${{ steps.set-meta-releases.outputs.meta-releases }}
39
+ steps :
40
+ - name : install libs
41
+ id : set-meta-releases
42
+ uses : cylc/release-actions/set-meta-releases@v1
43
+
33
44
deploy :
45
+ needs : set-meta-releases
34
46
runs-on : ubuntu-latest
35
47
timeout-minutes : 10
36
48
defaults :
37
49
run :
38
50
# use login shell for conda activation
39
51
shell : bash -leo pipefail {0}
52
+ strategy :
53
+ # run one job per meta-release
54
+ matrix :
55
+ meta_release : ${{ fromJson(needs.set-meta-releases.outputs.meta-releases) }}
56
+ # don't stop if one job fails
57
+ fail-fast : false
58
+ # only run one job at a time
59
+ max-parallel : 1
40
60
steps :
41
61
- name : configure python
42
62
uses : actions/setup-python@v4
@@ -55,13 +75,17 @@ jobs:
55
75
run : pip install "${{ github.workspace }}/docs[all]"
56
76
57
77
- name : install libs to document
58
- uses : ./docs/.github/ actions/install-libs
78
+ uses : cylc/release- actions/install-cylc-components@v1
59
79
with :
60
- # NOTE: these need to be manually updated as necessary:
61
- cylc-flow-tag : ' 8.1.x'
62
- # cylc-rose-tag:
63
- # cylc-uis-tag:
64
- metomi-rose-tag : ' 2.0.x'
80
+ meta_release : ${{ matrix.meta_release }}
81
+ cylc_flow : true
82
+ cylc_flow_opts : ' main_loop-log_data_store,main_loop-log_db,main_loop-log_main_loop,main_loop-log_memory'
83
+ cylc_uiserver : true
84
+ cylc_uiserver_opts : ' '
85
+ cylc_rose : true
86
+ cylc_rose_opts : ' '
87
+ metomi_rose : true
88
+ metomi_rose_opts : ' '
65
89
66
90
- name : checkout gh-pages branch
67
91
uses : actions/checkout@v3
91
115
git log --oneline --graph --no-abbrev-commit gh-pages
92
116
echo "::endgroup::"
93
117
echo "[command]git rebase -i --root"
94
- EDITOR='sed -i "s/pick \([0-9a-z]* -nightly build-\)/drop \1/"' \
118
+ # drop all "-nightly build-" commits which didn't come from this workflow run
119
+ EDITOR="sed -i '/-nightly build ${GITHUB_RUN_ID}-/! s/pick \(.* -nightly build\)/drop \1/'" \
95
120
git rebase -i --root
96
121
97
122
# if versions have been added/removed since the last build, we will
@@ -110,21 +135,22 @@ jobs:
110
135
111
136
- name : build docs
112
137
run : |
113
- version="nightly.$(isodatetime --utc -f %Y-%m-%d)"
138
+ version="nightly:${{ matrix.meta_release}}.$(isodatetime --utc -f %Y-%m-%d)"
139
+ builddir="nightly_${{ matrix.meta_release }}"
114
140
make -C docs \
115
141
html \
116
142
slides \
117
143
linkcheck \
118
144
SPHINXOPTS="-Wn --keep-going -A sidebar_version_name=${version}" \
119
145
STABLE=false \
120
146
LATEST=false \
121
- BUILDDIR=' doc/nightly' \
147
+ BUILDDIR=" doc/$builddir" \
122
148
FORCE_COLOR=true
123
- git -C gh-pages add 'nightly' 'versions.json'
149
+ git -C gh-pages add "$builddir" 'versions.json'
124
150
125
151
- name : push changes
126
152
working-directory : gh-pages
127
153
run : |
128
154
git status
129
- git commit -m ' -nightly build-'
155
+ git commit -m " -nightly build ${GITHUB_RUN_ID}-"
130
156
git push --force-with-lease origin gh-pages
0 commit comments