Skip to content

Commit 0132030

Browse files
committed
chore: update documentation generation workflow to prepare Jekyll site
- Replaced markdown conversion steps with Jekyll site preparation. - Added creation of a minimal _config.yml for Jekyll. - Adjusted file handling to rename main entry point to lowercase. - Improved logging for the site preparation process.
1 parent a4271a5 commit 0132030

1 file changed

Lines changed: 18 additions & 27 deletions

File tree

.github/workflows/test-docs-generation.yml

Lines changed: 18 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -55,50 +55,41 @@ jobs:
5555
mkdir -p .github/scripts/docs
5656
bash .github/scripts/docs/generate-and-publish-docs.sh "$BRANCH_TYPE" "$VERSION"
5757
58-
- name: Generate and convert documentation
58+
- name: Prepare Jekyll site
5959
run: |
60-
# Install markdown converter
61-
npm install -g marked
62-
6360
# Clean and setup output folder
6461
rm -rf _site
6562
mkdir -p _site
6663
6764
# Copy all docs recursively
6865
cp -r docs/* _site/
6966
70-
# Touch .nojekyll to disable Jekyll processing
71-
touch _site/.nojekyll
72-
73-
# Convert all .md files to .html
74-
find _site -name '*.md' | while read -r file; do
75-
html_file="${file%.md}.html"
76-
echo "Converting $file → $html_file"
77-
npx marked -i "$file" -o "$html_file"
78-
done
79-
80-
# Rename main entry point
81-
if [ -f _site/INDEX.html ]; then
82-
cp _site/INDEX.html _site/index.html
83-
fi
67+
# Rename main entry point to lowercase (Jekyll requirement)
68+
cp _site/INDEX.md _site/index.md
8469
85-
# Remove all .md files after converting (optional)
86-
find _site -name '*.md' -delete
70+
# Create minimal _config.yml
71+
cat > _site/_config.yml << EOF
72+
title: DEFRA Forms Engine Plugin
73+
description: Documentation for the DEFRA Forms Engine Plugin
74+
markdown: kramdown
75+
theme: minima
76+
EOF
8777
88-
echo "Conversion complete!"
78+
echo "Jekyll site preparation complete!"
8979
9080
- name: List _site contents
9181
run: |
92-
echo "Files in _site after conversion:"
82+
echo "Files in _site:"
9383
find _site -type f | sort
9484
95-
# Check index file specifically
96-
echo "Index file check:"
85+
# Check key files
86+
echo "Key files check:"
9787
ls -la _site/index*
88+
ls -la _site/_config.yml || echo "_config.yml not found"
9889
99-
# Peek at the content of the index file
100-
echo "First 20 lines of index.html:"
101-
head -n 20 _site/index.html || echo "index.html not found"
90+
# Peek at the content of the config file
91+
echo "Content of _config.yml:"
92+
cat _site/_config.yml
10293
10394
- name: Setup Pages
10495
uses: actions/configure-pages@v5

0 commit comments

Comments
 (0)