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

doc: initialize a user-facing mdbook #285

Merged
merged 3 commits into from
Jul 10, 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
12 changes: 12 additions & 0 deletions .github/workflows/build-userdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Build Aeneas user docs and test them
on: [push, pull_request]

jobs:
test:
name: Test Aeneas user docs
runs-on: [self-hosted, linux, nix]
steps:
- uses: actions/checkout@v4
- name: Build the book
run: nix build '.?dir=docs/user'#book
# TODO: test the Lean examples code via nix build '.?dir=docs/user'#test or something similar.
32 changes: 32 additions & 0 deletions .github/workflows/deploy-userdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Deploy Aeneas user docs to GitHub pages
on:
push:
branches:
- main

jobs:
deploy:
runs-on: [self-hosted, linux, nix]
permissions:
contents: write # To push a branch
pull-requests: write # To create a PR from that branch
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Deploy GitHub Pages
run: |
# This assumes your book is in the root of your repository.
# Just add a `cd` here if you need to change to another directory.
nix build '.?dir=docs/user'#book -o html
git worktree add gh-pages
git config user.name "Deploy from CI"
git config user.email ""
cd gh-pages
# Delete the ref to avoid keeping history.
git update-ref -d refs/heads/gh-pages
rm -rf *
cp --dereference -vr ../html/* .
git add .
git commit -m "Deploy $GITHUB_SHA to gh-pages"
git push --force --set-upstream origin gh-pages
1 change: 1 addition & 0 deletions docs/user/.envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
1 change: 1 addition & 0 deletions docs/user/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
book
6 changes: 6 additions & 0 deletions docs/user/book.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[book]
authors = ["The Aeneas contributors"]
language = "en"
multilingual = false
src = "src"
title = "Aeneas user documentation"
256 changes: 256 additions & 0 deletions docs/user/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading