Skip to content

Commit

Permalink
Merge pull request #104 from objectionary/74-set-up-a-site
Browse files Browse the repository at this point in the history
  • Loading branch information
fizruk authored Feb 12, 2024
2 parents 08ff912 + 94eb0ba commit b1781ea
Show file tree
Hide file tree
Showing 10 changed files with 623 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 docs ../../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
1 change: 1 addition & 0 deletions site/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# README
1 change: 1 addition & 0 deletions site/docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/docs
13 changes: 13 additions & 0 deletions site/docs/book.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[book]
authors = ["Danila Danko"]
language = "en"
multilingual = false
src = "src"
title = "phi-normalizer"

[output.html]
additional-css = ["theme/pagetoc.css"]
additional-js = ["theme/pagetoc.js"]

[build]
build-dir = "./docs"
1 change: 1 addition & 0 deletions site/docs/src/README.md
3 changes: 3 additions & 0 deletions site/docs/src/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Summary

- [README](./README.md)
Loading

0 comments on commit b1781ea

Please sign in to comment.