File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ name: Generate and Deploy Documentation
33on :
44 push :
55 branches :
6- - main
6+ - develop
77
88permissions :
99 actions : read
@@ -36,16 +36,34 @@ jobs:
3636 - name : Add DocFX to PATH
3737 run : echo "$HOME/.dotnet/tools" >> $GITHUB_PATH
3838
39+ - name : Create wwwroot directory for WebCore
40+ run : mkdir -p ./src/WebExpress.WebCore/wwwroot
41+
42+ - name : Build WebExpress.WebCore
43+ run : |
44+ dotnet build ./src/WebExpress.WebCore/WebExpress.WebCore.csproj -c Release
45+
3946 - name : Generate documentation
4047 run : |
4148 cd docs
4249 docfx metadata
4350 docfx build
4451
52+ - name : Generate API toc.yaml
53+ run : |
54+ echo "### YamlMime:TableOfContent" > docs/api/toc.yaml
55+ echo "[" >> docs/api/toc.yaml
56+ find docs/_site/api -maxdepth 1 -type f -name '*.html' | sort | while read file; do
57+ name=$(basename "$file" .html)
58+ echo " { \"name\": \"$name\", \"href\": \"$name.html\" }," >> docs/api/toc.yaml
59+ done
60+ sed -i '$ s/},/}/' docs/api/toc.yaml
61+ echo "]" >> docs/api/toc.yaml
62+
4563 - name : Upload artifact
4664 uses : actions/upload-pages-artifact@v3
4765 with :
48- path : ' _site'
66+ path : ' ./docs/ _site'
4967
5068 - name : Deploy to GitHub Pages
5169 id : deployment
You can’t perform that action at this time.
0 commit comments