summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorClementTsang <cjhtsang@uwaterloo.ca>2021-11-27 05:13:45 -0500
committerClement Tsang <34804052+ClementTsang@users.noreply.github.com>2021-11-27 05:31:32 -0500
commit305ff2a6725f113846d5bfba15c9169647566f99 (patch)
tree37326998686a13fd710902fa278f132702f3e417 /.github
parentafcf56e4ae00fc5de34c06dc521b247b3321f8d8 (diff)
ci: Add test for building docs
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/test-docs.yml39
1 files changed, 39 insertions, 0 deletions
diff --git a/.github/workflows/test-docs.yml b/.github/workflows/test-docs.yml
new file mode 100644
index 00000000..f02baad3
--- /dev/null
+++ b/.github/workflows/test-docs.yml
@@ -0,0 +1,39 @@
+name: test-docs
+on:
+ workflow_dispatch:
+ pull_request:
+
+jobs:
+ pre_job:
+ runs-on: ubuntu-latest
+ outputs:
+ should_skip: ${{ steps.skip_check.outputs.should_skip }}
+ steps:
+ - id: skip_check
+ uses: fkirc/skip-duplicate-actions@master
+ with:
+ skip_after_successful_duplicate: "true"
+ paths: '["docs/**", ".github/workflows/docs.yml"]'
+ do_not_skip: '["workflow_dispatch"]'
+
+ test-build-documentation:
+ name: Test building docs
+ needs: pre_job
+ if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ fetch-depth: 0
+
+ - uses: actions/setup-python@v2
+ with:
+ python-version: 3.x
+
+ - name: Install Python dependencies
+ run: pip install -r docs/requirements.txt
+
+ - name: Build docs with mkdocs
+ run: |
+ cd docs
+ mkdocs build