diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 9d5314ae4..2574a2157 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -23,17 +23,17 @@ jobs: - name: Pull in relevant images only run: git lfs pull -I "docs/wiring/images/*.png" - name: Build docs - run: cd docs - && ./docs.sh build - && touch _build/html/.nojekyll - - name: Link Checker - uses: lycheeverse/lychee-action@v1.8.0 - with: - fail: true - # Check all markdown and html files - args: -c docs/lychee.toml . - env: - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + run: ./docs/docs.sh build + - name: Check links + run: ./docs/docs.sh check +# - name: Link Checker +# uses: lycheeverse/lychee-action@v1.8.0 +# with: +# fail: true +# # Check all markdown and html files +# args: -c docs/lychee.toml . +# env: +# GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - name: Deploy to Github Pages if: ${{ github.ref == 'refs/heads/master' }} uses: JamesIves/github-pages-deploy-action@v4 diff --git a/docs/docs.sh b/docs/docs.sh index 4a304d37a..df5e96938 100755 --- a/docs/docs.sh +++ b/docs/docs.sh @@ -15,7 +15,7 @@ # limitations under the License. # This script should work no matter where you call it from. -cd "$(dirname "$0")" +pushd "$(dirname "$0")" > /dev/null || exit_fail . ../software/common/base.sh @@ -47,8 +47,10 @@ install_linux() { sudo apt update sudo apt install -y \ make \ + docker.io \ doxygen \ graphviz + docker pull lycheeverse/lychee echo "If you wish to use \`./docs.sh check\` to check validity of links locally, please follow installation instructions at https://github.com/lycheeverse/lychee" } @@ -58,6 +60,7 @@ build_all() { poetry run wiring -d ./wiring poetry run parts -f ./purchasing/parts.json poetry run make html + touch ./_build/html/.nojekyll } launch_browser() { @@ -66,7 +69,8 @@ launch_browser() { check_links() { echo "If you wish to use \`./docs.sh check\` to check validity of links locally, please follow installation instructions at https://github.com/lycheeverse/lychee" - lychee .. + docker run --init -it --rm -w /input -v $(pwd)/..:/input lycheeverse/lychee -c ./docs/lychee.toml . +# lychee .. } ######## diff --git a/docs/lychee.toml b/docs/lychee.toml index 8aa68e93b..2abae7b89 100644 --- a/docs/lychee.toml +++ b/docs/lychee.toml @@ -1,10 +1,21 @@ ############################# Display ############################# +# Verbose program output +# Accepts log level: "error", "warn", "info", "debug", "trace" +#verbose = "info" + # Don't show interactive progress bar while checking links. no_progress = true +# Path to summary output file. +#output = ".config.dummy.report.md" + ############################# Runtime ############################# +# Number of threads to utilize. +# Defaults to number of cores available to the system if omitted. +threads = 2 + # Maximum number of allowed redirects. max_redirects = 5 @@ -47,7 +58,7 @@ headers = [] # HTTP basic auth support. This will be the username and password passed to the # authorization HTTP header. See # -basic_auth = "user:pwd" +#basic_auth = "user:pwd" ############################# Exclusions ##########################