diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml new file mode 100644 index 00000000000..560da2cf318 --- /dev/null +++ b/.github/workflows/deploy-docs.yml @@ -0,0 +1,41 @@ +name: Build Doxygen and deploy to GitHub Pages +permissions: + actions: read + contents: write + pages: write + +on: + push: + branches: + - main + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + concurrency: ci-${{github. ref}} + steps: + - name : Checkout + uses: actions/checkout@v4 + + - name: Install Doxygen + run: sudo apt-get install doxygen graphviz -y + shell: bash + + - name: Generate Doxygen Documentation + run: | + cd docs/doxygen + doxygen doxygen.cfg + shell: bash + + - name: Create .nojekyll + run: | + cd docs/doxygen/build + touch html/.nojekyll + shell: bash + + - name: Deploy to GitHub Pages + uses: JamesIves/github-pages-deploy-action@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + branch: gh-pages + folder: docs/doxygen/build/html diff --git a/docs/assets/p4-fav.svg b/docs/assets/p4-fav.svg new file mode 100644 index 00000000000..6be6013a1c0 --- /dev/null +++ b/docs/assets/p4-fav.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/docs/doxygen/p4-logo.png b/docs/assets/p4-logo.png similarity index 100% rename from docs/doxygen/p4-logo.png rename to docs/assets/p4-logo.png diff --git a/docs/doxygen/bfn_footer.tex b/docs/doxygen/bfn_footer.tex new file mode 100644 index 00000000000..52dc4aec2ee --- /dev/null +++ b/docs/doxygen/bfn_footer.tex @@ -0,0 +1 @@ +%%BEGIN COMPACT_LATEX diff --git a/docs/doxygen/doxygen.cfg b/docs/doxygen/doxygen.cfg index d7e90b7f766..803d09d2bae 100644 --- a/docs/doxygen/doxygen.cfg +++ b/docs/doxygen/doxygen.cfg @@ -61,13 +61,13 @@ PROJECT_BRIEF = "The P4 Compiler" # pixels and the maximum width should not exceed 200 pixels. Doxygen will copy # the logo to the output directory. -PROJECT_LOGO = ./p4-logo.png +PROJECT_LOGO = ../assets/p4-logo.png # With the PROJECT_ICON tag one can specify an icon that is included in the tabs # when the HTML document is shown. Doxygen will copy the logo to the output # directory. -PROJECT_ICON = +PROJECT_ICON = ../assets/p4-fav.svg # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path # into which the generated documentation will be written. If a relative path is @@ -168,7 +168,7 @@ INLINE_INHERITED_MEMB = NO # shortest path that makes the file name unique will be used # The default value is: YES. -FULL_PATH_NAMES = YES +FULL_PATH_NAMES = NO # The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. # Stripping is only done if one of the specified strings matches the left-hand @@ -1058,7 +1058,7 @@ EXAMPLE_RECURSIVE = NO # that contain images that are to be included in the documentation (see the # \image command). -IMAGE_PATH = ../../docs/doxygen +IMAGE_PATH = ../../docs/assets # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program @@ -2729,7 +2729,7 @@ DIR_GRAPH_MAX_DEPTH = 1 # The default value is: png. # This tag requires that the tag HAVE_DOT is set to YES. -DOT_IMAGE_FORMAT = png +DOT_IMAGE_FORMAT = svg # If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to # enable generation of interactive SVG images that allow zooming and panning. @@ -2741,7 +2741,7 @@ DOT_IMAGE_FORMAT = png # The default value is: NO. # This tag requires that the tag HAVE_DOT is set to YES. -INTERACTIVE_SVG = NO +INTERACTIVE_SVG = YES # The DOT_PATH tag can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found in the path. diff --git a/docs/doxygen/p4c_header.html b/docs/doxygen/p4c_header.html index e602137a913..a25f8c1d8cd 100644 --- a/docs/doxygen/p4c_header.html +++ b/docs/doxygen/p4c_header.html @@ -9,7 +9,7 @@ $projectname: $title $title - +