From a56e1442b98624123a767ea540c178e9ed003861 Mon Sep 17 00:00:00 2001 From: Danila Danko Date: Wed, 31 Jul 2024 11:01:14 +0300 Subject: [PATCH 1/2] fix(ci): move mdbook steps to the pipeline job --- .github/workflows/ghc.yml | 39 +++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ghc.yml b/.github/workflows/ghc.yml index 9a2d5b1e..b06a7264 100644 --- a/.github/workflows/ghc.yml +++ b/.github/workflows/ghc.yml @@ -259,6 +259,25 @@ jobs: files="site proposals README.md" commit_and_push_if_changed "$files" "Markdown files" + - name: Create a directory for docs + if: runner.os == 'Linux' + run: mkdir -p dist + + - name: Setup mdBook + if: runner.os == 'Linux' + uses: jontze/action-mdbook@v3 + with: + token: ${{secrets.GITHUB_TOKEN}} + mdbook-version: "~0.4.40" + use-linkcheck: true + + - name: Run mdbook + if: runner.os == 'Linux' + run: | + cd site/docs + mdbook build + mv docs/html ../../dist/docs + - name: Upload pipeline artifact id: pipeline-artifact if: always() @@ -276,16 +295,17 @@ jobs: # It saves just the content of this directory. # # Seems like the wildcard case (https://github.com/actions/upload-artifact#upload-using-multiple-paths-and-exclusions) - # is triggered when there are no paths that don't start with "pipeline" + # is triggered when all paths start with "pipeline". # - # I added a dummy path to not trigger the wildcard case + # Hence, to preserve the path structure, it's necessary + # to add a path that doesn't start with "pipeline". path: | pipeline !pipeline/**/.eoc !pipeline/eo-yaml pipeline/eo-initial/.eoc/4-pull/org/ pipeline/phi-initial/.eoc/phi/org - dummy + dist - name: Write about the artifact in the job summary if: always() @@ -343,24 +363,11 @@ jobs: pattern: pipeline-files-${{ runner.os }} merge-multiple: true - - name: Setup mdBook - uses: jontze/action-mdbook@v3 - with: - token: ${{secrets.GITHUB_TOKEN}} - mdbook-version: "~0.4.37" - use-linkcheck: true - - name: Add haddock run: | mkdir -p dist/haddock mv $(stack path --local-doc-root)/* dist/haddock - - name: Add docs - run: | - cd site/docs - mdbook build - mv docs/html ../../dist/docs - - name: Add report run: | mkdir -p dist/report From 97598fcbc332a28dffab77801e899dfb5881db4f Mon Sep 17 00:00:00 2001 From: Danila Danko Date: Wed, 31 Jul 2024 11:32:36 +0300 Subject: [PATCH 2/2] fix(site): command name --- site/docs/src/SUMMARY.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/docs/src/SUMMARY.md b/site/docs/src/SUMMARY.md index 6419a1f5..e2de0bb0 100644 --- a/site/docs/src/SUMMARY.md +++ b/site/docs/src/SUMMARY.md @@ -11,6 +11,6 @@ - [normalizer metrics](./normalizer/metrics.md) - [normalizer pipeline](./normalizer/pipeline.md) - [normalizer pipeline prepare-tests](./normalizer/pipeline/prepare-tests.md) - - [normalizer pipeline prepare-pipeline-configs](./normalizer/pipeline/print-dataize-configs.md) + - [normalizer pipeline print-dataize-configs](./normalizer/pipeline/print-dataize-configs.md) - [normalizer pipeline report](./normalizer/pipeline/report.md) - [Contributing](./contributing.md)