new file mode 100644
@@ -0,0 +1,16 @@
+#
+# Github Action to setup The SELinux Notebook build
+#
+# Copyright (c) 2022 Microsoft Corporation <paulmoore@microsoft.com>
+# Author: Paul Moore <paul@paul-moore.com>
+#
+
+name: Setup the build for The SELinux Notebook
+description: "Install dependencies for The SELinux Notebook build"
+runs:
+ using: "composite"
+ steps:
+ - run: sudo apt-get update
+ shell: bash
+ - run: sudo apt-get install -y build-essential weasyprint pandoc calibre
+ shell: bash
new file mode 100644
@@ -0,0 +1,26 @@
+#
+# Github Action to build The SELinux Notebook
+#
+# Copyright (c) 2022 Microsoft Corporation <paulmoore@microsoft.com>
+# Author: Paul Moore <paul@paul-moore.com>
+#
+
+name: EPUB build
+on: ["push", "pull_request"]
+
+jobs:
+ epub:
+ runs-on: ubuntu-20.04
+
+ steps:
+ - name: Checkout from GitHub
+ uses: actions/checkout@v2
+ - name: Setup the build directory
+ uses: ./.github/actions/setup
+ - name: Run the build
+ run: make epub
+ - name: Archive the rendering
+ uses: actions/upload-artifact@v3
+ with:
+ name: EPUB rendering
+ path: ./epub/SELinux_Notebook.azw3
new file mode 100644
@@ -0,0 +1,26 @@
+#
+# Github Action to build The SELinux Notebook
+#
+# Copyright (c) 2022 Microsoft Corporation <paulmoore@microsoft.com>
+# Author: Paul Moore <paul@paul-moore.com>
+#
+
+name: HTML build
+on: ["push", "pull_request"]
+
+jobs:
+ html:
+ runs-on: ubuntu-20.04
+
+ steps:
+ - name: Checkout from GitHub
+ uses: actions/checkout@v2
+ - name: Setup the build directory
+ uses: ./.github/actions/setup
+ - name: Run the build
+ run: make html
+ - name: Archive the rendering
+ uses: actions/upload-artifact@v3
+ with:
+ name: HTML rendering
+ path: ./html/SELinux_Notebook.html
new file mode 100644
@@ -0,0 +1,26 @@
+#
+# Github Action to build The SELinux Notebook
+#
+# Copyright (c) 2022 Microsoft Corporation <paulmoore@microsoft.com>
+# Author: Paul Moore <paul@paul-moore.com>
+#
+
+name: PDF build
+on: ["push", "pull_request"]
+
+jobs:
+ pdf:
+ runs-on: ubuntu-20.04
+
+ steps:
+ - name: Checkout from GitHub
+ uses: actions/checkout@v2
+ - name: Setup the build directory
+ uses: ./.github/actions/setup
+ - name: Run the build
+ run: make pdf
+ - name: Archive the rendering
+ uses: actions/upload-artifact@v3
+ with:
+ name: PDF rendering
+ path: ./pdf/SELinux_Notebook.pdf
This patch adds GH Actions to built the HTML, PDF, and EPUB variants of The SELinux Notebook when the GH repo is updated or a pull request is submitted. This should make it much easier for people to validate their changes as well as providing fully rendered copies for each revision moving forward. Signed-off-by: Paul Moore <paul@paul-moore.com> --- .github/actions/setup/action.yml | 16 ++++++++++++++++ .github/workflows/epub.yml | 26 ++++++++++++++++++++++++++ .github/workflows/html.yml | 26 ++++++++++++++++++++++++++ .github/workflows/pdf.yml | 26 ++++++++++++++++++++++++++ 4 files changed, 94 insertions(+) create mode 100644 .github/actions/setup/action.yml create mode 100644 .github/workflows/epub.yml create mode 100644 .github/workflows/html.yml create mode 100644 .github/workflows/pdf.yml