From ac6977125cc4d4f7a8ce6a04c576c107f5fa655c Mon Sep 17 00:00:00 2001 From: Danila Danko Date: Thu, 8 Feb 2024 15:54:46 +0300 Subject: [PATCH] feat: build site in CI --- .github/workflows/ghc.yml | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ghc.yml b/.github/workflows/ghc.yml index 4ca298037..778907f78 100644 --- a/.github/workflows/ghc.yml +++ b/.github/workflows/ghc.yml @@ -74,10 +74,10 @@ jobs: env: PROGRAM: ${{ matrix.program }} - haddock: + docs: needs: [build] if: ${{ github.ref_name == 'master' }} - name: "Build and upload Haddock documentation (master)" + name: "Build and upload site (master)" runs-on: ubuntu-latest steps: @@ -95,10 +95,23 @@ jobs: mkdir -p dist/haddock mv $(stack path --local-doc-root)/* dist/haddock - - name: 🚀 Publish Haddock Documentation + - name: Setup mdBook + uses: peaceiris/actions-mdbook@v1 + with: + mdbook-version: 'latest' + + - name: Build site + run: | + cd site/docs + mdbook build + mv book ../../dist + + cd .. + mv index.html ../dist + + - name: 🚀 Publish Site uses: JamesIves/github-pages-deploy-action@v4 with: token: ${{ secrets.GITHUB_TOKEN }} - folder: dist/haddock - target-folder: haddock + folder: dist single-commit: true