Skip to content

Commit

Permalink
Move documentation to a separate Github action from compile/tests
Browse files Browse the repository at this point in the history
  • Loading branch information
danakj committed Oct 28, 2022
1 parent b877b51 commit 0ccf951
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 9 deletions.
9 changes: 0 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
env:
HDOC_PROJECT_API_KEY: ${{ secrets.HDOC_PROJECT_API_KEY }}
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -166,13 +164,6 @@ jobs:
message(FATAL_ERROR "Running tests failed!")
endif()
- name: Documentation
if: ${{ startsWith(matrix.config.cxx, 'g++') && env.HDOC_PROJECT_API_KEY != '' }}
uses: hdoc/hdoc-github-action@v2
with:
compile-commands-path: out/compile_commands.json
hdoc-api-key: ${{ env.HDOC_PROJECT_API_KEY }}

- name: Install Strip
run: cmake --install out --prefix instdir --strip

Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: docs

on:
push:
branches: [main]

jobs:
docs:
name: Generate documentation
if: github.repository == 'chromium/subspace'
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1

- name: Configure
run: |
sudo apt install build-essential cmake ninja-build
cmake -G Ninja -B out -D CMAKE_EXPORT_COMPILE_COMMANDS=1
- name: Documentation
uses: hdoc/hdoc-github-action@v2
with:
compile-commands-path: out/compile_commands.json
hdoc-api-key: ${{ secrets.HDOC_PROJECT_API_KEY }}

0 comments on commit 0ccf951

Please sign in to comment.