Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

74 set up a site #104

Merged
merged 3 commits into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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