From 113db6d46ba869184c656330a3de12a72bf4cead Mon Sep 17 00:00:00 2001 From: zeme Date: Thu, 27 Jun 2024 16:04:56 +0200 Subject: [PATCH 1/3] Deploy haddock --- .github/workflows/haddock-site.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/haddock-site.yml b/.github/workflows/haddock-site.yml index 32dbb5981e0..0afafaf48ce 100644 --- a/.github/workflows/haddock-site.yml +++ b/.github/workflows/haddock-site.yml @@ -6,6 +6,9 @@ name: "📜 Haddock Site" on: + push: + branches: + - master workflow_dispatch: inputs: ref: From d5cca82df8775fec6ef1f4148fd1298c21e94e52 Mon Sep 17 00:00:00 2001 From: zeme Date: Tue, 2 Jul 2024 08:46:48 +0200 Subject: [PATCH 2/3] Improvements to haddock-site.yml --- .github/workflows/haddock-site.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/haddock-site.yml b/.github/workflows/haddock-site.yml index 0afafaf48ce..98536a32631 100644 --- a/.github/workflows/haddock-site.yml +++ b/.github/workflows/haddock-site.yml @@ -2,6 +2,8 @@ # https://intersectmbo.github.io/plutus/haddock/$version # And optionally to: # https://intersectmbo.github.io/plutus/haddock/latest +# On push to master, this workflows publishes to: +# https://intersectmbo.github.io/plutus/haddock/master name: "📜 Haddock Site" @@ -47,8 +49,13 @@ jobs: - name: Checkout uses: actions/checkout@main with: - ref: ${{ inputs.ref }} + ref: ${{ inputs.ref || github.ref_name }} + - name: Checkout Haddock Script + run: | + git fetch origin master + git checkout origin/master ./scripts/combined-haddock.sh + - name: Build Site run: | nix develop --no-warn-dirty --accept-flake-config --command ./scripts/combined-haddock.sh _haddock all @@ -57,7 +64,7 @@ jobs: uses: JamesIves/github-pages-deploy-action@v4.6.1 with: folder: _haddock - target-folder: haddock/${{ inputs.destination }} + target-folder: haddock/${{ inputs.destination || github.ref_name }} single-commit: true - name: Deploy Site (latest) From 9302baecdc46c00666af4632668549779f622775 Mon Sep 17 00:00:00 2001 From: zeme Date: Tue, 2 Jul 2024 09:44:05 +0200 Subject: [PATCH 3/3] wip --- scripts/combined-haddock.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/combined-haddock.sh b/scripts/combined-haddock.sh index c7c3c4ee147..8f9e58fe651 100755 --- a/scripts/combined-haddock.sh +++ b/scripts/combined-haddock.sh @@ -312,6 +312,13 @@ for failure in "${BROKEN_LINKS[@]}"; do done +echo "Looking for linkchecker" +if ! command -v linkchecker &> /dev/null; then + echo "linkchecker not found" + exit 0 +done + + echo "Running linkchecker" time linkchecker "${OUTPUT_DIR}/index.html" \ --check-extern \