|
1 |
| -name: Generate Documentation |
| 1 | +name: Docs Only Build |
2 | 2 |
|
3 | 3 | on:
|
4 |
| - push: |
5 |
| - branches: |
6 |
| - - master # Run on every push to master, adjust as needed |
7 |
| - - making-docs |
| 4 | + workflow_dispatch: |
8 | 5 |
|
9 | 6 | jobs:
|
10 |
| - build: |
| 7 | + build-docs: |
| 8 | + name: Build Docs |
11 | 9 | runs-on: ubuntu-latest
|
12 |
| - |
13 | 10 | 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 | + |
| 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