Skip to content

Commit 032340b

Browse files
committed
added dispoAPI doc generation to workflow
1 parent 5e1c296 commit 032340b

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

.github/workflows/redocly_and_publish.yml

+11-8
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Generate html from yml docs and publish to pages
33
on:
44
push:
55
branches:
6-
- main
6+
- main
77

88
jobs:
99
generate_docs:
@@ -19,7 +19,7 @@ jobs:
1919

2020
- name: Check for .yml files
2121
run: |
22-
if ls *.yml 1> /dev/null 2>&1; then
22+
if ls ./*.yml dispoAPI/*.yml 1> /dev/null 2>&1; then
2323
echo "YAML files found."
2424
else
2525
echo "No YAML files found. Exiting."
@@ -34,14 +34,18 @@ jobs:
3434

3535
- name: Generate HTML files
3636
run: |
37-
for file in *.yml; do
38-
redocly build-docs -o ${file%.*}.html $file
37+
for file in ./*.yml dispoAPI/*.yml; do
38+
if [ -f "$file" ]; then
39+
dir=$(dirname "$file")
40+
output_html="${dir}/index.html"
41+
redocly build-docs -o "$output_html" "$file"
42+
fi
3943
done
4044
4145
- name: Add noIndex Meta Tag
4246
run: |
43-
for file in *.html; do
44-
if [[ -f "$file" ]]; then
47+
for file in ./*.html dispoAPI/*.html; do
48+
if [ -f "$file" ]; then
4549
echo "Found HTML file: $file"
4650
if sed -i '/<head>/a <meta name="robots" content="noindex">' "$file"; then
4751
echo "Added meta tag to $file successfully."
@@ -50,14 +54,13 @@ jobs:
5054
fi
5155
fi
5256
done
53-
5457
shell: bash
5558

5659
- name: Set up Git
5760
run: |
5861
git config --global user.email "[email protected]"
5962
git config --global user.name "GitHub Actions"
60-
63+
6164
- name: Deploy to GitHub Pages
6265
uses: JamesIves/[email protected]
6366
with:

0 commit comments

Comments
 (0)