Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 78 additions & 0 deletions .github/workflows/docsWithAw.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Build opm-grid/opm/grid Doxygen Docs and push to gh-pages

on:
push:
branches:
- '**'
pull_request_target:
types: closed
branches: master

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y doxygen graphviz unzip wget

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"

- name: Install Python packages
run: |
python -m pip install --upgrade pip
pip install sphinx==7.1.2 breathe==4.35.0 furo

- name: Prepare output directory
run: |
mkdir -p docs/doxygen docs/doxygen-awesome-css

# Download Doxygen Awesome CSS theme assets
- name: Download Doxygen Awesome CSS
run: |
wget -q -O docs/doxygen-awesome-css/doxygen-awesome.css https://cdn.jsdelivr.net/gh/jothepro/doxygen-awesome-css@master/doxygen-awesome.css
wget -q -O docs/doxygen-awesome-css/doxygen-awesome-darkmode-toggle.js https://cdn.jsdelivr.net/gh/jothepro/doxygen-awesome-css@master/doxygen-awesome-darkmode-toggle.js
wget -q -O docs/doxygen-awesome-css/doxygen-awesome-fragment-copy-button.js https://cdn.jsdelivr.net/gh/jothepro/doxygen-awesome-css@master/doxygen-awesome-fragment-copy-button.js

# Download your custom header.html if you use it
- name: Download custom header.html
run: |
doxygen -w html header.html footer.html stylesheet.css

# edit header.html if you use it
# - name: Edit header.html ???
# run: wget -q -O docs/header.html https://your-url.com/header.html

- name: Create minimal Doxyfile (to be improved)
run: |
rm -f Doxyfile
echo "PROJECT_NAME = "OPM Grid"" >> Doxyfile
echo "OUTPUT_DIRECTORY = docs/doxygen" >> Doxyfile
echo "INPUT = opm/grid/" >> Doxyfile
echo "RECURSIVE = YES" >> Doxyfile
echo "GENERATE_HTML = YES" >> Doxyfile
echo "GENERATE_LATEX = NO" >> Doxyfile
echo "GENERATE_XML = NO" >> Doxyfile
echo "EXTRACT_ALL = YES" >> Doxyfile
echo "HTML_EXTRA_STYLESHEET = docs/doxygen-awesome-css/doxygen-awesome.css" >> Doxyfile
echo "HTML_EXTRA_FILES = docs/doxygen-awesome-css/doxygen-awesome-darkmode-toggle.js \
docs/doxygen-awesome-css/doxygen-awesome-fragment-copy-button.js" >> Doxyfile
# echo "HTML_HEADER = docs/header.html" >> Doxyfile

- name: Build Doxygen documentation
run: |
doxygen Doxyfile

- name: Deploy documentation
uses: OPM/github-pages-deploy-action@releases/v4
with:
branch: gh-pages
folder: docs/doxygen/html