-
Notifications
You must be signed in to change notification settings - Fork 4
Feat/pages #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/pages #9
Changes from all commits
bf48e0e
81525be
40e6671
7f48d05
f0c63fd
2361f46
8db9315
e2b71ff
f0a6fe0
b6026a0
fe20585
fb9c16b
2c8780f
8b8569d
2d59eb4
eb59fde
c791d80
40ffd76
c3dbe30
5e6a3ab
b388e1c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| name: Build gh-pages | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - '**' | ||
| tags: | ||
| - '**' | ||
| pull_request: | ||
| branches: | ||
| - '**' | ||
|
|
||
| jobs: | ||
| build-gh-pages: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Install build dependencies | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y doxygen sed git python3 | ||
|
|
||
| - name: Checkout source | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Checkout gh-pages | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
| ref: gh-pages | ||
| path: gh-pages | ||
|
|
||
| - name: Mark working directory as safe | ||
| run: git config --global --add safe.directory $GITHUB_WORKSPACE | ||
|
|
||
| - name: Build gh-pages | ||
| shell: bash | ||
| run: | | ||
| BUILDDIR=$(pwd)/docs | ||
| GH_PAGES_DIR_NAME=$(pwd)/gh-pages | ||
| SAFE_BRANCH=$(echo "${GITHUB_REF_NAME}" | tr '/' '-') | ||
| DOCS=${GH_PAGES_DIR_NAME}/${SAFE_BRANCH} | ||
|
|
||
| install -d ${BUILDDIR} | ||
| rm -rf "${BUILDDIR}/html" | ||
| rm -rf "${DOCS}" | ||
|
|
||
| doxygen doxygen.cfg | ||
| touch "${BUILDDIR}/html/.nojekyll" | ||
| mv "${BUILDDIR}/html" ${DOCS} | ||
|
|
||
| cd "${GH_PAGES_DIR_NAME}" && python3 ../docs/create_directory_listing.py | ||
|
|
||
| # add updated branch listing | ||
| cp ${BUILDDIR}/*.css ${GH_PAGES_DIR_NAME}/ | ||
| cp ${BUILDDIR}/index.html ${GH_PAGES_DIR_NAME}/ | ||
|
|
||
| git config user.name "Robert Burger" | ||
| git config user.email "robert.burger@dlr.de" | ||
|
|
||
| git add index.html content.html navtree.css main.css "${SAFE_BRANCH}/*" | ||
| git commit -m 'Automatic update of GH pages' || echo "No changes to commit" | ||
|
|
||
| # Push to gh-pages branch, force update | ||
| if ! git diff --quiet; then | ||
| git push origin HEAD:gh-pages --force | ||
| else | ||
| echo "No changes to push" | ||
| fi | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,7 +4,7 @@ | |
| # You can set these variables from the command line. | ||
| DOXYFILE = doxygen.cfg | ||
| SOURCEDIR = ./ | ||
| BUILDDIR = $(SOURCEDIR)/doc | ||
| BUILDDIR = $(SOURCEDIR)/docs | ||
| GH_PAGES_DIR_NAME = gh-pages | ||
| BRANCH_DIR_NAME = $(subst /,_,$(BRANCH_NAME)) | ||
| BUILDCMD = cissy run -c $(SOURCEDIR) -p doxygen/[~=1.8]@3rdparty/stable doxygen | ||
|
|
@@ -21,10 +21,10 @@ gh-pages: | |
| install -d $(BUILDDIR) | ||
| rm -rf "$(BUILDDIR)/html" | ||
| rm -rf "$(DOCS)" | ||
| make -f Makefile.doc doc/html | ||
| make -f Makefile.doc docs/html | ||
| touch "$(BUILDDIR)/html/.nojekyll" | ||
| mv "$(BUILDDIR)/html" $(DOCS) | ||
| cd "$(GH_PAGES_DIR_NAME)" && python3 ../doc/create_directory_listing.py | ||
| ( cd "$(GH_PAGES_DIR_NAME)" && python3 ../docs/create_directory_listing.py ) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This line correctly calls the Python script to generate the directory listing. However, the script
Since this line is being modified, it would be a good time to also fix the script it calls to ensure valid HTML is generated. |
||
| # add updated branch listing | ||
| cp $(BUILDDIR)/*.css $(GH_PAGES_DIR_NAME)/ | ||
| cp $(BUILDDIR)/index.html $(GH_PAGES_DIR_NAME)/ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1263,7 +1263,7 @@ GENERATE_HTML = YES | |
| # The default directory is: html. | ||
| # This tag requires that the tag GENERATE_HTML is set to YES. | ||
|
|
||
| HTML_OUTPUT = doc/html | ||
| HTML_OUTPUT = docs/html | ||
|
|
||
| # The HTML_FILE_EXTENSION tag can be used to specify the file extension for each | ||
| # generated HTML page (for example: .htm, .php, .asp). | ||
|
|
@@ -1330,7 +1330,7 @@ HTML_STYLESHEET = | |
| # documentation. | ||
| # This tag requires that the tag GENERATE_HTML is set to YES. | ||
|
|
||
| HTML_EXTRA_STYLESHEET = doc/doxygen_theme_flat_design/src/doxygen-style.css | ||
| HTML_EXTRA_STYLESHEET = docs/doxygen_theme_flat_design/src/doxygen-style.css | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The path to the stylesheet is updated correctly. However, I've noticed a potential issue within the referenced stylesheet |
||
|
|
||
|
|
||
| # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or | ||
|
|
@@ -1576,7 +1576,7 @@ QHP_NAMESPACE = org.doxygen.Project | |
| # The default value is: doc. | ||
| # This tag requires that the tag GENERATE_QHP is set to YES. | ||
|
|
||
| QHP_VIRTUAL_FOLDER = doc | ||
| QHP_VIRTUAL_FOLDER = docs | ||
|
|
||
| # If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom | ||
| # filter to add. For more information please see Qt Help Project / Custom | ||
|
|
@@ -1902,7 +1902,7 @@ GENERATE_LATEX = NO | |
| # The default directory is: latex. | ||
| # This tag requires that the tag GENERATE_LATEX is set to YES. | ||
|
|
||
| LATEX_OUTPUT = doc/latex | ||
| LATEX_OUTPUT = docs/latex | ||
|
|
||
| # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be | ||
| # invoked. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While changing
BUILDDIRtodocsis consistent with the other changes, this change highlights a critical issue later in thegh-pagestarget. The commands on lines 29-30 use$(BUILDDIR)to copy CSS and HTML files:However, the Doxygen output is generated into
$(BUILDDIR)/html(based ondoxygen.cfg), and this directory is moved to$(DOCS)on line 26. Consequently, thecpcommands on lines 29-30 will fail because the source files do not exist in$(BUILDDIR). This will break thegh-pagesdeployment.This appears to be a pre-existing issue, but since you are modifying
BUILDDIR, it's a good opportunity to fix it. The fix might involve copying the files from$(BUILDDIR)/htmlbefore themvcommand, or from$(DOCS)after it.