Skip to content

Commit 9132d9f

Browse files
committed
Trying out different docs generation strategy.
1 parent 49e5580 commit 9132d9f

File tree

1 file changed

+17
-45
lines changed

1 file changed

+17
-45
lines changed

.github/workflows/generate-docs.yml

Lines changed: 17 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,23 @@
1-
name: Generate Documentation
1+
name: Docs Only Build
22

33
on:
4-
push:
5-
branches:
6-
- master # Run on every push to master, adjust as needed
7-
- making-docs
4+
workflow_dispatch:
85

96
jobs:
10-
build:
7+
build-docs:
8+
name: Build Docs
119
runs-on: ubuntu-latest
12-
1310
steps:
14-
- name: Check out code
15-
uses: actions/checkout@v2
16-
17-
- name: Set up .NET SDK
18-
uses: actions/setup-dotnet@v2
19-
with:
20-
dotnet-version: '6.x' # Ensure compatibility with DocFX
21-
22-
- name: Install DocFX
23-
run: |
24-
wget https://github.com/dotnet/docfx/releases/download/v2.58/docfx.zip
25-
unzip docfx.zip -d docfx
26-
27-
- name: Locate DocFX Path
28-
id: locate_docfx
29-
run: |
30-
DOCFX_PATH=$(find $GITHUB_WORKSPACE -name "docfx" -type f -executable | head -n 1)
31-
if [ -z "$DOCFX_PATH" ]; then
32-
echo "Error: DocFX not found."
33-
exit 1
34-
fi
35-
echo "DOCFX_PATH=$DOCFX_PATH" >> $GITHUB_ENV
36-
chmod +x $DOCFX_PATH # Ensure executable permissions
37-
38-
- name: Set Permissions for docfx.json
39-
run: chmod +r docfx_project/docfx.json # Place this step here to set permissions
40-
41-
- name: Generate Documentation
42-
run: |
43-
$DOCFX_PATH docfx_project/docfx.json
44-
45-
46-
- name: Publish to GitHub Wiki
47-
uses: peaceiris/actions-gh-pages@v3
48-
with:
49-
github_token: ${{ secrets.DOCS_TOKEN }}
50-
publish_dir: docfx_project/site
51-
publish_branch: 'wiki' # Pushes directly to the wiki branch
11+
- name: Checkout
12+
uses: actions/checkout@v2
13+
14+
- name: Build Documentation
15+
uses: nikeee/[email protected]
16+
with:
17+
args: docfx_project/docfx.json
18+
19+
- name: Deploy to GitHub Pages
20+
uses: peaceiris/actions-gh-pages@v3
21+
with:
22+
github_token: ${{ secrets.GITHUB_TOKEN }}
23+
publish_dir: ./docs

0 commit comments

Comments
 (0)