Skip to content

Commit e1a936a

Browse files
authored
ci: auto-generate docs with Natural Docs + GitHub Pages (#103)
* ci: add Natural Docs project configuration * ci: add Natural Docs documentation workflow * ci: remove old static docs, gitignore generated output
1 parent a0a59bc commit e1a936a

123 files changed

Lines changed: 63 additions & 7097 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/docs.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Documentation
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- 'addons/**'
8+
- 'NaturalDocs.Project/**'
9+
- '.github/workflows/docs.yml'
10+
11+
permissions:
12+
pages: write
13+
id-token: write
14+
15+
concurrency:
16+
group: pages
17+
cancel-in-progress: true
18+
19+
jobs:
20+
build-and-deploy:
21+
runs-on: ubuntu-latest
22+
23+
environment:
24+
name: github-pages
25+
url: ${{ steps.deployment.outputs.page_url }}
26+
27+
steps:
28+
- name: Checkout repository
29+
uses: actions/checkout@v4
30+
31+
- name: Setup .NET
32+
uses: actions/setup-dotnet@v4
33+
with:
34+
dotnet-version: '8.0.x'
35+
36+
- name: Install Natural Docs
37+
run: dotnet tool install --global Natural_Docs --version 2.3.1
38+
39+
- name: Generate documentation
40+
run: NaturalDocs NaturalDocs.Project --rebuild
41+
42+
- name: Upload Pages artifact
43+
uses: actions/upload-pages-artifact@v3
44+
with:
45+
path: docs-output
46+
47+
- name: Deploy to GitHub Pages
48+
id: deployment
49+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ hemtt.exe
88

99
.hemttprivatekey
1010
*.biprivatekey
11+
12+
docs-output/

NaturalDocs.Project/Languages.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Language: SQF
2+
3+
Extensions: sqf hpp
4+
5+
Line Comments: //
6+
Block Comments: /* */

NaturalDocs.Project/Project.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Title: OCAP2
2+
Subtitle: Operations Capture and Playback
3+
4+
Source Folder: ../addons
5+
6+
HTML Output Folder: ../docs-output

docs/files/extension/fnc_sendData-sqf.html

Lines changed: 0 additions & 43 deletions
This file was deleted.

0 commit comments

Comments
 (0)