Skip to content

Commit

Permalink
feat: build site in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
deemp committed Feb 8, 2024
1 parent 9cb8705 commit ac69771
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions .github/workflows/ghc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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

0 comments on commit ac69771

Please sign in to comment.