diff mbox series

[v2,2/2] github: Add workflow to build and deploy docs

Message ID 20220308014543.1308349-3-joel@jms.id.au
State Accepted
Headers show
Series Build and deploy docs | expand

Checks

Context Check Description
snowpatch_ozlabs/github-Docker_builds_and_checks fail check_build (centos8) failed at step Create Docker image.

Commit Message

Joel Stanley March 8, 2022, 1:45 a.m. UTC
This builds the gcov coverage report and the skiboot docs on the Github
hosted runner, without using a container.

Remove the CROSS= definition from build-docs.sh to allow the makefile
detect which cross compiler is installed, instead of hardcoding the
non-le variant.

This is a simplification from the previous docs build, which used the
containers. However the containers have since been re-worked and no
longer leave the build artifacts on the host system.

The github action used for deploying seems to be the most commonly used:

 https://github.com/JamesIves/github-pages-deploy-action

Signed-off-by: Joel Stanley <joel@jms.id.au>
---
 .github/workflows/build-docs.yml | 30 ++++++++++++++++++++++++++++++
 opal-ci/build-docs.sh            |  1 -
 2 files changed, 30 insertions(+), 1 deletion(-)
 create mode 100644 .github/workflows/build-docs.yml
diff mbox series

Patch

diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml
new file mode 100644
index 000000000000..242f2002e5cc
--- /dev/null
+++ b/.github/workflows/build-docs.yml
@@ -0,0 +1,30 @@ 
+name: Generate and deploy documentation
+
+on:
+  push:
+    branches:
+      - master
+
+jobs:
+  docs-build-and-deploy:
+
+    runs-on: ubuntu-latest
+
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v2
+
+      - name: Install apt dependencies
+        run: |
+          sudo apt install -qq build-essential gcc-powerpc64le-linux-gnu git lcov \
+          device-tree-compiler libssl-dev libmbedtls-dev \
+          python3-sphinx python3-recommonmark
+
+      - name: Generate docs and coverage report
+        run: ./opal-ci/build-docs.sh
+
+      - name: Deploy docs
+        uses: JamesIves/github-pages-deploy-action@v4.2.5
+        with:
+          branch: gh-pages
+          folder: doc/_build/ghpages
diff --git a/opal-ci/build-docs.sh b/opal-ci/build-docs.sh
index 4125f33d1a86..05e6e7318cb2 100755
--- a/opal-ci/build-docs.sh
+++ b/opal-ci/build-docs.sh
@@ -5,7 +5,6 @@  set -e
 set -vx
 
 MAKE_J=$(grep -c processor /proc/cpuinfo)
-export CROSS="ccache powerpc64-linux-gnu-"
 
 make -j${MAKE_J} SKIBOOT_GCOV=1 coverage-report