ci: Add test for building docs
This commit is contained in:
parent
afcf56e4ae
commit
305ff2a672
|
@ -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
|
Loading…
Reference in New Issue