From 7d6f4d15e72e7cf29c1c216b68c01d0e1ea213eb Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Wed, 28 Jun 2023 15:06:43 -0400 Subject: [PATCH] ci: add docs build to GHA Signed-off-by: Henry Schreiner --- .github/workflows/docs.yml | 53 ++++++++++++++++++++++++++++++++++++++ book/package.json | 15 +++++++++++ 2 files changed, 68 insertions(+) create mode 100644 .github/workflows/docs.yml create mode 100644 book/package.json diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 000000000..9d3bcd9a8 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,53 @@ +name: Docs + +on: + pull_request: + push: + branches: + - main + +jobs: + apidocs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - uses: mattnotmitt/doxygen-action@v1 + with: + doxyfile-path: ./docs/Doxyfile + + - uses: actions/upload-artifact@v3 + with: + name: api-docs + path: html + + gitbook: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-node@v3 + with: + node-version: 16 + + - uses: awalsh128/cache-apt-pkgs-action@v1 + with: + packages: calibre calibre-bin libxss1 libasound2 + + - name: Install JS requirements + working-directory: book + run: | + npm install + + - name: Build book + working-directory: book + run: | + npx gitbook build . public + npx gitbook pdf . public/cli11.pdf + + - uses: actions/upload-artifact@v3 + with: + name: gitbook + path: book/public + + diff --git a/book/package.json b/book/package.json new file mode 100644 index 000000000..151496aee --- /dev/null +++ b/book/package.json @@ -0,0 +1,15 @@ +{ + "name": "cli11-gitbook", + "version": "1.0.0", + "dependencies": { + "gitbook-cli": "2.2.0", + "gitbook-plugin-hints": "^1.0.2", + "gitbook-plugin-include-codeblock": "^3.2.2", + "gitbook-plugin-term": "^0.5.1", + "svgexport": ">=0.4.2" + }, + "scripts": { + "postinstall": "npx gitbook fetch 3.2.3 && npx gitbook install" + } +} +