2022-10-25 01:24:08 -04:00
|
|
|
# Small CI workflow to test if mkdocs documentation can be successfully built.
|
|
|
|
|
2022-11-06 03:44:02 -05:00
|
|
|
name: test docs
|
2021-11-27 05:13:45 -05:00
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
pull_request:
|
|
|
|
|
2022-10-25 01:24:08 -04:00
|
|
|
concurrency:
|
2022-11-02 01:29:41 -04:00
|
|
|
group: ${{ github.workflow }}-${{ github.event.ref }}
|
|
|
|
cancel-in-progress: ${{ github.event_name == 'pull_request' || github.repository != 'ClementTsang/bottom' }}
|
2022-10-25 01:24:08 -04:00
|
|
|
|
2021-11-27 05:13:45 -05:00
|
|
|
jobs:
|
2022-11-04 04:48:44 -04:00
|
|
|
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
|
2022-10-20 06:24:04 -04:00
|
|
|
uses: fkirc/skip-duplicate-actions@f11521568414503656a5af807dc3018c012552c4 # v5.2.0
|
2021-11-27 05:13:45 -05:00
|
|
|
with:
|
|
|
|
skip_after_successful_duplicate: "true"
|
2022-10-27 22:00:37 -04:00
|
|
|
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
|
2022-11-04 04:48:44 -04:00
|
|
|
needs: pre-job
|
|
|
|
if: ${{ needs.pre-job.outputs.should_skip != 'true' }}
|
2021-11-27 05:13:45 -05:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-06-02 18:04:51 -04:00
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v3
|
2021-11-27 05:13:45 -05:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
2022-10-29 05:03:19 -04:00
|
|
|
- uses: actions/setup-python@v4.3.0
|
2021-11-27 05:13:45 -05:00
|
|
|
with:
|
2022-10-29 05:03:19 -04:00
|
|
|
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
|