Skip to content

Commit

Permalink
Adds CI action to generate and upload docs to gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
dylon committed Feb 18, 2024
1 parent 5491224 commit 2e3c059
Show file tree
Hide file tree
Showing 7 changed files with 91 additions and 205 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/deploy-static-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages

on:
# Runs on pushes targeting the default branch
push:
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
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v3.0.1
with:
auto-activate-base: false
environment-file: environment-docs.yml
activate-environment: ll-cpp-docs
miniforge-version: latest
use-mamba: true
channels: conda-forge

- name: Configure CMake
shell: bash -el {0}
run: cmake -B build -DGENERATE_DOCS=ON

- name: Generate Docs
shell: bash -el {0}
working-directory: build
run: make doxygen

- name: Setup Pages
uses: actions/configure-pages@v4

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: 'build/doxygen/html'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
2 changes: 1 addition & 1 deletion .github/workflows/generate-test-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4

- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v3.0.1
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@
!/proto/*.proto

!/src/**/*.cpp
!/src/**/*.dox
!/src/**/*.h
!/src/**/*.hpp
!/src/**/*.pxd
!/src/**/CMakeLists.txt

!/docs/**/*.dox
!/docs/**/*.md

!/third-party/**/CMakeLists.txt
!/third-party/**/*.h
!/third-party/**/*.hpp
Expand Down
7 changes: 4 additions & 3 deletions Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ PROJECT_NAME = @PROJECT_NAME@
PROJECT_NUMBER = @PROJECT_VERSION@
PROJECT_BRIEF = @PROJECT_DESCRIPTION@
PROJECT_LOGO = @CMAKE_SOURCE_DIR@/logo-55x55.png
INPUT = @CMAKE_SOURCE_DIR@/src
INPUT = @CMAKE_SOURCE_DIR@/README.md @CMAKE_SOURCE_DIR@/docs @CMAKE_SOURCE_DIR@/src @CMAKE_SOURCE_DIR@/example/README.md @CMAKE_SOURCE_DIR@/example/src
USE_MDFILE_AS_MAINPAGE = @CMAKE_SOURCE_DIR@/README.md
OUTPUT_DIRECTORY = @CMAKE_BINARY_DIR@/doxygen
ALLOW_UNICODE_NAMES = YES
ALWAYS_DETAILED_SEC = YES
Expand All @@ -25,6 +26,7 @@ EXTRACT_STATIC = YES
EXTRACT_STATIC = YES
FULL_SIDEBAR = NO
GENERATE_HTML = YES
GENERATE_HTMLHELP = NO
GENERATE_LATEX = NO
GENERATE_MAN = NO
GENERATE_TREEVIEW = YES
Expand All @@ -46,5 +48,4 @@ TEMPLATE_RELATIONS = YES
TOC_EXPAND = YES
UML_LIMIT_NUM_FIELDS = 0
UML_LOOK = YES
USE_MATHJAX = YES
USE_MDFILE_AS_MAINPAGE = "index.md"
USE_MATHJAX = YES
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ whichever is the latest standard). If you need compatibility with an older
standard, please either submit a pull request (preferably) or create an issue
stating the standard you need compatibility with and I will comply if I can.

For a demonstration, please reference the [example app](example/).
For a demonstration, please reference the [example app](example/README.md).

## Initialization

Expand Down Expand Up @@ -257,7 +257,7 @@ target_link_libraries(${PROJECT_NAME}
levenshtein)
```

```c++
```cpp
// file: main.cpp

#include <algorithm>
Expand Down
16 changes: 16 additions & 0 deletions docs/namespaces.dox
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// -*- mode: c-or-c++ -*-

/**
* Various utilities regarding Levenshtein transducers. The classes of interest,
* to most, will be the various dictionaries, transducer implementations, and
* serializers. The remaining classes are likely of little interest to anyone
* but maintainers and the curiously minded.
*/
namespace liblevenshtein {}

/**
* Memoized, recursive distance metrics typically used to evaluate the
* correctness of Levenshtein automata. These may also be used to compare
* individual pairs of terms.
*/
namespace liblevenshtein::distance {}
198 changes: 0 additions & 198 deletions src/namespaces.dox

This file was deleted.

0 comments on commit 2e3c059

Please sign in to comment.