TIL: auto-deploy doxygen to GitHub Pages

2022-06-05 00:00:00 +0000 UTC

GitHub Actions and GitHub Pages provide a convenient set of tools for publishing automatically generated HTML documentation for public projects. For my project ccask the documentation is generated using Doxygen and published on GH Pages here.

The bulk of the process is handled by this GH Actions workflow:

name: Doxygen
permissions: 
  contents: write
on:
  push:
    branches: [ "main" ]
  workflow_dispatch:


jobs:
  docs:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      
      - name: install doxygen
        run: sudo apt-get install -y doxygen

      - name: Run doxygen
        run: doxygen Doxyfile

      - name: Deploy 🚀
        uses: JamesIves/github-pages-deploy-action@v4.3.3
        with:
          branch: gh-pages # The branch the action should deploy to.
          folder: html # The folder the action should deploy.

Important notes:

Tags: til github devops c doxygen