summaryrefslogtreecommitdiff
path: root/.github/workflows/doxygen.yml
diff options
context:
space:
mode:
authorLevent Kaya <levent.kaya@codefirst.io>2024-11-27 10:41:11 +0300
committerLevent Kaya <levent.kaya@codefirst.io>2024-11-27 10:41:11 +0300
commitba1ea7ea9bbc1d18f2c8c931f7ed1fe4b592e7c2 (patch)
treef2c695660d0a832ec2876ae6b9b511515d53d294 /.github/workflows/doxygen.yml
parentdd7821327f88d81bf3a1508e45398cc520359db6 (diff)
[ci]
Diffstat (limited to '.github/workflows/doxygen.yml')
-rw-r--r--.github/workflows/doxygen.yml49
1 files changed, 25 insertions, 24 deletions
diff --git a/.github/workflows/doxygen.yml b/.github/workflows/doxygen.yml
index 063216d..00338bb 100644
--- a/.github/workflows/doxygen.yml
+++ b/.github/workflows/doxygen.yml
@@ -1,18 +1,12 @@
name: Generate Documentation
on:
- # Triggers the workflow on push events to the main branch
push:
branches: [ "master" ]
-
- # Triggers the workflow on pull request events to the main branch
pull_request:
branches: [ "master" ]
-
- # Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
-# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
@@ -25,7 +19,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
with:
- fetch-depth: 0 # This ensures full history for all branches and tags
+ fetch-depth: 0
submodules: recursive
- name: Set up Python
@@ -44,38 +38,45 @@ jobs:
run: |
git clone https://github.com/mosra/m.css.git
+ - name: Create documentation directory
+ run: mkdir -p documentation
+
- name: Prepare Doxyfile
run: |
doxygen -g Doxyfile
# Configure Doxyfile for m.css and project specifics
- sed -i 's/PROJECT_NAME.*=.*/PROJECT_NAME = "fbgl"/g' Doxyfile
+ sed -i 's/PROJECT_NAME.*=.*/PROJECT_NAME = "Your Project Name"/g' Doxyfile
sed -i 's/INPUT.*=.*/INPUT = README.md fbhl.h/g' Doxyfile
sed -i 's/USE_MDFILE_AS_MAINPAGE.*=.*/USE_MDFILE_AS_MAINPAGE = README.md/g' Doxyfile
sed -i 's/EXTRACT_ALL.*=.*/EXTRACT_ALL = YES/g' Doxyfile
sed -i 's/RECURSIVE.*=.*/RECURSIVE = YES/g' Doxyfile
- sed -i 's/GENERATE_HTML.*=.*/GENERATE_HTML = NO/g' Doxyfile
- sed -i 's/GENERATE_XML.*=.*/GENERATE_XML = YES/g' Doxyfile
+ sed -i 's/GENERATE_HTML.*=.*/GENERATE_HTML = YES/g' Doxyfile
+ sed -i 's/OUTPUT_DIRECTORY.*=.*/OUTPUT_DIRECTORY = documentation/g' Doxyfile
- name: Generate Documentation with m.css
run: |
python3 m.css/documentation/doxygen.py Doxyfile
- - name: Setup Pages
- uses: actions/configure-pages@v4
-
- - name: Upload artifact
- uses: actions/upload-pages-artifact@v3
- with:
- path: 'documentation'
+ - name: Verify documentation exists
+ run: |
+ ls -R documentation/html
- deploy:
- environment:
- name: github-pages
- url: ${{ steps.deployment.outputs.page_url }}
- runs-on: ubuntu-latest
+ deploy-docs:
needs: build-docs
+ runs-on: ubuntu-latest
steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Download artifact
+ uses: actions/download-artifact@v4
+ with:
+ name: github-pages
+
- name: Deploy to GitHub Pages
- id: deployment
- uses: actions/deploy-pages@v4 \ No newline at end of file
+ uses: peaceiris/actions-gh-pages@v3
+ with:
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ publish_dir: ./documentation/html
+ publish_branch: gh-pages \ No newline at end of file