]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Add doc build to Github Actions config 1118/head
authorGreg Hudson <ghudson@mit.edu>
Sun, 20 Sep 2020 20:41:08 +0000 (16:41 -0400)
committerGreg Hudson <ghudson@mit.edu>
Tue, 22 Sep 2020 21:31:01 +0000 (17:31 -0400)
Add a second workflow to build documentation, with the HTML output as
a generated artifact.  Skip the doc workflow if no documentation files
were changed.  Skip the existing build workflow if no source files
were changed.

.github/workflows/build.yml
.github/workflows/doc.yml [new file with mode: 0644]

index 2af7da2f4b2181d745c8f762714a020d9554b9ef..8d1042b7bf3dc644a46caab66631897e9d73777a 100644 (file)
@@ -1,6 +1,8 @@
 name: Build
 
-on: [push, pull_request]
+on:
+    push: {paths: [src/**, .github/workflows/build.yml]}
+    pull_request: {paths: [src/**, .github/workflows/build.yml]}
 
 jobs:
 
diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml
new file mode 100644 (file)
index 0000000..292df4c
--- /dev/null
@@ -0,0 +1,27 @@
+name: Doc
+
+on:
+    push: {paths: [doc/**, src/doc/*, src/include/krb5/krb5.hin, .github/workflows/doc.yml]}
+    pull_request: {paths: [doc/**, src/doc/*, src/include/krb5/krb5.hin, .github/workflows/doc.yml]}
+
+jobs:
+    doc:
+        runs-on: ubuntu-18.04
+        steps:
+            - name: Checkout repository
+              uses: actions/checkout@v1
+            - name: Linux setup
+              run: |
+                sudo apt-get update -qq
+                sudo apt-get install -y doxygen python3-lxml python3-pip python-sphinx
+                pip3 install Cheetah3
+            - name: Build documentation
+              run: |
+                cd src/doc
+                make -f Makefile.in SPHINX_ARGS=-W htmlsrc
+            - name: Upload HTML
+              uses: actions/upload-artifact@v2
+              with:
+                  name: html
+                  path: doc/html
+                  retention-days: 7