Test if docs can build in CI
This commit is contained in:
parent
cc7db833df
commit
9fed4598ce
|
@ -1,4 +1,4 @@
|
||||||
name: linkcheck
|
name: CI
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
@ -8,10 +8,21 @@ on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
linkcheck:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Build docs
|
||||||
|
run: bash ci/docker-build.sh
|
||||||
|
|
||||||
|
|
||||||
|
linkcheck:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Verify links
|
- name: Verify links
|
||||||
run: bash ci/docker-linkcheck.sh
|
run: bash ci/docker-linkcheck.sh
|
|
@ -0,0 +1 @@
|
||||||
|
mkdocs
|
|
@ -0,0 +1,16 @@
|
||||||
|
#! /bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
set -o pipefail
|
||||||
|
set -x
|
||||||
|
|
||||||
|
this_dir="$(readlink -f -- "$(dirname -- "${BASH_SOURCE[0]}")")"
|
||||||
|
image="python:3-alpine"
|
||||||
|
|
||||||
|
# as we use a pipe to stdin and thus cannot use -it, Ctrl-C does not work by default
|
||||||
|
# turns out that combining -i with --init solves that problem
|
||||||
|
# see https://stackoverflow.com/a/60812082
|
||||||
|
docker run --rm -i -v "$this_dir"/..:/ws -w /ws --init "$image" sh <<\EOF
|
||||||
|
pip install -r ci/build-requirements.txt
|
||||||
|
mkdocs build
|
||||||
|
EOF
|
Loading…
Reference in New Issue