From 0536cff1df9260d1914b8b974d12a6a4b9e5b985 Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Sun, 5 Jan 2025 15:55:15 +0100 Subject: [PATCH] Adding url link checking to repo (#366) * added linkcheck to url * using make cmd for linecheck * using make cmd for linecheck * make ci and docs yaml similar * added shell * cd docs * added lincheck inline * added shell * added shell * added -b * break url to test linkcheck * reverted broken link test --- .github/workflows/ci.yml | 7 ++-- .github/workflows/documentation_update.yml | 39 ++++++++++++---------- 2 files changed, 24 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fa8e92ae..bead8840 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,11 +33,10 @@ jobs: cache-environment: true post-cleanup: 'all' - - name: install dependencies run tests + - name: install dependencies shell: bash -el {0} - run: | - python -m pip install .[tests] - + run: python -m pip install .[tests] + - name: Test with pytest shell: bash -el {0} run: | diff --git a/.github/workflows/documentation_update.yml b/.github/workflows/documentation_update.yml index 8ab8325c..b502bf60 100644 --- a/.github/workflows/documentation_update.yml +++ b/.github/workflows/documentation_update.yml @@ -1,32 +1,31 @@ name: documentation release on: - pull_request: - branches: - - main - push: - branches: - - main - tags: - - '*' + pull_request: + branches: + - main + push: + branches: + - main + tags: + - '*' permissions: contents: write jobs: - testing: + test: name: Documentation runs-on: ubuntu-latest steps: - - name: checkout actions - uses: actions/checkout@v4 - - name: Install system packages run: | sudo apt-get update -y sudo apt-get install -y libgl1 libglx-mesa0 libgl1-mesa-dev libglu1-mesa-dev freeglut3-dev libosmesa6 libosmesa6-dev libgles2-mesa-dev libarchive-dev libpangocairo-1.0-0 + - name: checkout actions + uses: actions/checkout@v4 - uses: mamba-org/setup-micromamba@v1 with: @@ -36,23 +35,27 @@ jobs: cache-environment: true post-cleanup: 'all' - - name: install package - run: | - pip install --upgrade pip - pip install .[docs] + - name: install dependencies + shell: bash -el {0} + run: python -m pip install .[docs] + - name: Sphinx build tagged version if: startsWith(github.ref, 'refs/tags/') + shell: bash -el {0} run: | sphinx-build docs _build/${{ github.ref_name }} rm -rf _build/stable mkdir -p _build/stable - sphinx-build docs _build/stable + sphinx-build -b linkcheck docs _build/stable + - name: Sphinx build dev version if: (github.event_name == 'push' || github.event_name == 'pull_request') && !startsWith(github.ref, 'refs/tags/') + shell: bash -el {0} run: | rm -rf _build/dev mkdir -p _build/dev - sphinx-build docs _build/dev + sphinx-build -b linkcheck docs _build/dev + - name: Deploy docs to GitHub Pages if: github.event_name == 'push' || startsWith(github.ref, 'refs/tags/') uses: peaceiris/actions-gh-pages@v4