Skip to content

Commit

Permalink
Setup GHA workflow to publish docs using mdbook
Browse files Browse the repository at this point in the history
  • Loading branch information
abailly committed Jun 16, 2024
1 parent c498ac9 commit 0e3919a
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 2 deletions.
25 changes: 23 additions & 2 deletions .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
name: Haskell CI

on:
push:
branches: [ "main" ]
pull_request:
push:
branches: [ "main" ]

permissions:
Expand Down Expand Up @@ -67,3 +66,25 @@ jobs:

- name: 🧪 Run tests
run: cabal test --extra-include-dirs=/usr/local/include --extra-lib-dirs=/usr/local/lib all

docs:
runs-on: ubuntu-latest
# if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- name: ✅ Checkout
uses: actions/checkout@v4

- name: 🪨 Setup mdBook
uses: peaceiris/actions-mdbook@v2
with:
mdbook-version: '0.4.40'

- name: 📓 Build docs
run: mdbook build docs

- name: 🚀 Deploy
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/book
cname: alba.cardano-scaling.org
1 change: 1 addition & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
book
6 changes: 6 additions & 0 deletions docs/book.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[book]
authors = ["Arnaud Bailly"]
language = "en"
multilingual = false
src = "src"
title = "ALBA"
3 changes: 3 additions & 0 deletions docs/src/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Summary

- [Chapter 1](./chapter_1.md)
1 change: 1 addition & 0 deletions docs/src/chapter_1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Chapter 1

0 comments on commit 0e3919a

Please sign in to comment.