Skip to content

Commit 487fed4

Browse files
authored
Update deploy.yml
docs generation step added
1 parent 783ecc3 commit 487fed4

File tree

1 file changed

+39
-4
lines changed

1 file changed

+39
-4
lines changed

.github/workflows/deploy.yml

+39-4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ permissions:
66
contents: write
77
packages: write
88
deployments: write
9+
pages: write
910
jobs:
1011
build:
1112
strategy:
@@ -59,7 +60,6 @@ jobs:
5960
- name: Build
6061
run: cmake --build build --config Release
6162

62-
# Debugging step: Print out directory contents (after build)
6363
- name: List output directory contents
6464
run: |
6565
if [ -d "out" ];then
@@ -70,10 +70,8 @@ jobs:
7070
7171
- name: Prepare files for packaging
7272
run: |
73-
# Create the directory structure for the package
7473
mkdir -p package/Release/${{ matrix.platform }}/lib
7574
76-
# Only copy binaries if the output directory exists
7775
if [ -d "out" ]; then
7876
cp -r out/* package/Release/${{ matrix.platform }}/lib/ || true
7977
else
@@ -113,7 +111,6 @@ jobs:
113111

114112
- name: Create OS-specific packages
115113
run: |
116-
# Group by OS platform
117114
for os_platform in windows linux macos; do
118115
mkdir -p "GekkoNet-${os_platform}"
119116
mkdir -p "GekkoNet-${os_platform}/${os_platform}/include"
@@ -136,3 +133,41 @@ jobs:
136133
draft: false
137134
prerelease: false
138135
files: GekkoNet-*-Release.tar.gz
136+
137+
generate_docs:
138+
needs: create_release
139+
runs-on: ubuntu-latest
140+
if: ${{ success() }}
141+
permissions:
142+
contents: write
143+
pages: write
144+
145+
steps:
146+
- uses: actions/checkout@v4
147+
148+
- name: Install Doxygen
149+
run: sudo apt-get update && sudo apt-get install -y doxygen graphviz
150+
151+
- name: Configure CMake for Documentation
152+
run: |
153+
cmake -B build \
154+
-DBUILD_DOCS=ON \
155+
-DCMAKE_BUILD_TYPE=Release \
156+
GekkoLib
157+
158+
- name: Generate Documentation
159+
run: cmake --build build --target docs
160+
161+
- name: Setup Pages
162+
uses: actions/configure-pages@v4
163+
164+
- name: Upload Documentation
165+
uses: actions/upload-pages-artifact@v3
166+
with:
167+
path: 'build/docs/html'
168+
169+
- name: Deploy to GitHub Pages
170+
id: deployment
171+
uses: actions/deploy-pages@v4
172+
with:
173+
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)