Skip to content

Commit aa54e3b

Browse files
committed
Add render stage for OCP EAT profile spec.
1 parent f54f463 commit aa54e3b

1 file changed

Lines changed: 41 additions & 2 deletions

File tree

.github/workflows/deploy_pages.yml

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ jobs:
6868
--nogitversion \
6969
--template_html extra/ocp-pandoc-resources/html/ocp.html.template \
7070
--html_stylesheet extra/ocp-pandoc-resources/html/style.css \
71-
--html_stylesheet extra/ocp-pandoc-resources/html/github-markdown.css \
7271
--html spec.html spec.ocp
7372
7473
popd
@@ -110,7 +109,6 @@ jobs:
110109
--nogitversion \
111110
--template_html extra/ocp-pandoc-resources/html/ocp.html.template \
112111
--html_stylesheet extra/ocp-pandoc-resources/html/style.css \
113-
--html_stylesheet extra/ocp-pandoc-resources/html/github-markdown.css \
114112
--html spec.html spec.ocp
115113
116114
popd
@@ -122,6 +120,47 @@ jobs:
122120
echo "Added webpage dpe-irot-profile/${trimmed_ref}/index.html"
123121
done
124122
123+
- name: Render OCP EAT Profile HTML
124+
run: |
125+
# Need to trust directory in the docker container.
126+
chown -R $(id -u):$(id -g) $PWD
127+
128+
# Publish pages for `main`
129+
GIT_REFS=()
130+
GIT_REFS+=("main")
131+
132+
cp -R ocp-spec-tools specifications/ietf-eat-profile/extra
133+
134+
for ref in "${GIT_REFS[@]}"; do
135+
echo "Building git ref $ref"
136+
137+
git reset --hard $ref
138+
139+
pushd specifications/ietf-eat-profile
140+
141+
if [[ "${ref}" == "main" ]]; then
142+
# Label the current spec version.
143+
commit_hash=$(git rev-parse --short HEAD)
144+
sed -i -r "/^---$/,/^---$/s/(version: .*)/\1 (Git commit ${commit_hash})/g" spec.ocp
145+
fi
146+
147+
/usr/bin/build.sh \
148+
--crossref=tcg \
149+
--csl extra/ocp-pandoc-resources/ieee.csl \
150+
--nogitversion \
151+
--template_html extra/ocp-pandoc-resources/html/ocp.html.template \
152+
--html_stylesheet extra/ocp-pandoc-resources/html/style.css \
153+
--html spec.html spec.ocp
154+
155+
popd
156+
157+
trimmed_ref="HEAD"
158+
159+
mkdir -p "gh-pages/ietf-eat-profile/${trimmed_ref}"
160+
cp specifications/ietf-eat-profile/spec.html "gh-pages/ietf-eat-profile/${trimmed_ref}/index.html"
161+
echo "Added webpage ietf-eat-profile/${trimmed_ref}/index.html"
162+
done
163+
125164
- name: Upload artifacts for rendered specs
126165
uses: actions/upload-artifact@v4
127166
with:

0 commit comments

Comments
 (0)