bottom/.github/workflows/test-docs.yml

47 lines
1.3 KiB
YAML
Raw Normal View History

# Small CI workflow to test if mkdocs documentation can be successfully built.
name: test docs
2021-11-27 05:13:45 -05:00
on:
workflow_dispatch:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' || github.repository != 'ClementTsang/bottom' }}
2021-11-27 05:13:45 -05:00
jobs:
pre-job:
2021-11-27 05:13:45 -05:00
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@f11521568414503656a5af807dc3018c012552c4 # v5.2.0
2021-11-27 05:13:45 -05:00
with:
skip_after_successful_duplicate: "true"
paths: '["docs/**", ".github/workflows/docs.yml", ".github/workflows/test-docs.yml"]'
2021-11-27 05:13:45 -05:00
do_not_skip: '["workflow_dispatch"]'
test-build-documentation:
name: Test building docs
needs: pre-job
if: ${{ needs.pre-job.outputs.should_skip != 'true' }}
2021-11-27 05:13:45 -05:00
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
2021-11-27 05:13:45 -05:00
with:
fetch-depth: 0
- uses: actions/setup-python@v4.3.0
2021-11-27 05:13:45 -05:00
with:
python-version: 3.9
2021-11-27 05:13:45 -05:00
- name: Install Python dependencies
run: pip install -r docs/requirements.txt
- name: Build docs with mkdocs
run: |
cd docs
mkdocs build