diff options
Diffstat (limited to '.github/workflows/test_docs.yml')
-rw-r--r-- | .github/workflows/test_docs.yml | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/.github/workflows/test_docs.yml b/.github/workflows/test_docs.yml new file mode 100644 index 00000000..c91b6389 --- /dev/null +++ b/.github/workflows/test_docs.yml @@ -0,0 +1,46 @@ +# Small CI workflow to test if mkdocs documentation can be successfully built. + +name: test docs +on: + workflow_dispatch: + pull_request: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' || github.repository != 'ClementTsang/bottom' }} + +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@f75f66ce1886f00957d99748a42c724f4330bdcf # v5.3.1 + with: + skip_after_successful_duplicate: "true" + paths: '["docs/**", ".github/workflows/docs.yml", ".github/workflows/test_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: + - name: Checkout repository + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + with: + fetch-depth: 0 + + - uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0 + with: + python-version: 3.11 + + - name: Install Python dependencies + run: pip install -r docs/requirements.txt + + - name: Build docs with mkdocs + run: | + cd docs + mkdocs build |