Skip to content

Commit 1b8a2ca

Browse files
committed
Use mkdocs
1 parent 14c95dd commit 1b8a2ca

29 files changed

+184
-579
lines changed

.github/workflows/docs.yml

Lines changed: 73 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -1,97 +1,83 @@
1-
# name: Project documentation
2-
3-
# on:
4-
# push:
5-
# branches: [master]
6-
# pull_request:
7-
# branches: [master]
8-
9-
# jobs:
10-
# docs:
11-
# name: "Generate project documenation"
12-
# runs-on: ${{ matrix.os }}
13-
# strategy:
14-
# matrix:
15-
# os: [ubuntu-latest]
16-
# steps:
17-
# # Checkout code
18-
# - name: Checkout code
19-
# uses: actions/checkout@v3
20-
# - name: Cache deps
21-
# uses: actions/cache@v2
22-
# with:
23-
# path: vendor/bundle
24-
# key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile') }}
25-
# restore-keys: |
26-
# ${{ runner.os }}-gems-
27-
# # - name: Build site
28-
# # uses: actions/jekyll-build-pages@v1
29-
# # with:
30-
# # source: "./docs"
31-
# # destination: "./site"
32-
# - name: Publish docs
33-
# if: github.ref == 'refs/heads/master'
34-
# uses: peaceiris/actions-gh-pages@v3
35-
# with:
36-
# enable_jekyll: true
37-
# # see https://docs.github.com/en/free-pro-team@latest/actions/reference/authentication-in-a-workflow#about-the-github_token-secret
38-
# github_token: ${{ secrets.GITHUB_TOKEN }}
39-
# publish_dir: ./public
40-
# #destination_dir: "odinson"
41-
# user_name: 'github-actions[bot]'
42-
# user_email: 'github-actions[bot]@users.noreply.github.com'
43-
# commit_message: ${{ github.event.head_commit.message }}
44-
# cname: docs.lum.ai
45-
46-
47-
# Sample workflow for building and deploying a Jekyll site to GitHub Pages
48-
name: Deploy Jekyll with GitHub Pages dependencies preinstalled
1+
name: Project documentation
492

503
on:
51-
# Runs on pushes targeting the default branch
524
push:
53-
branches: ["master"]
54-
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
558
# Allows you to run this workflow manually from the Actions tab
569
workflow_dispatch:
5710

58-
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
59-
permissions:
60-
contents: read
61-
pages: write
62-
id-token: write
63-
64-
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
65-
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
66-
concurrency:
67-
group: "pages"
68-
cancel-in-progress: false
11+
# # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
12+
# permissions:
13+
# contents: read
14+
# pages: write
15+
# id-token: write
6916

7017
jobs:
71-
# Build job
72-
build:
73-
runs-on: ubuntu-latest
18+
docs:
19+
name: "Generate project documenation"
20+
runs-on: ${{ matrix.os }}
21+
strategy:
22+
matrix:
23+
os: [ubuntu-latest]
24+
python-version: [ '3.9' ]
7425
steps:
75-
- name: Checkout
76-
uses: actions/checkout@v3
77-
- name: Setup Pages
78-
uses: actions/configure-pages@v3
79-
- name: Build with Jekyll
80-
uses: actions/jekyll-build-pages@v1
81-
with:
82-
source: ./docs
83-
destination: ./_site
84-
- name: Upload artifact
85-
uses: actions/upload-pages-artifact@v1
26+
# Checkout code
27+
- name: Checkout code
28+
uses: actions/checkout@v3
8629

87-
# Deployment job
88-
deploy:
89-
environment:
90-
name: github-pages
91-
url: ${{ steps.deployment.outputs.page_url }}
92-
runs-on: ubuntu-latest
93-
needs: build
94-
steps:
95-
- name: Deploy to GitHub Pages
96-
id: deployment
97-
uses: actions/deploy-pages@v2
30+
- name: Set up Python
31+
uses: actions/setup-python@v2
32+
with:
33+
python-version: ${{ matrix.python-version }}
34+
#architecture: x64
35+
- name: Display Python version
36+
run: |
37+
python -c "import sys; print(sys.version)"
38+
# - name: Setup JDK
39+
# uses: actions/setup-java@v3
40+
# with:
41+
# distribution: temurin
42+
# java-version: 11
43+
# Install dependencies
44+
- name: Doc deps
45+
working-directory: "./docs"
46+
run: |
47+
pip install -r requirements.txt
48+
49+
# docs (API)
50+
# generate python docs using pdoc
51+
# - name: "Create API docs"
52+
# run: |
53+
# sbt doc
54+
# mkdir -p $GITHUB_WORKSPACE/docs/api/scala
55+
# mv target/doc/* $GITHUB_WORKSPACE/docs/api/scala/
56+
# generate Rust docs using cargo doc
57+
58+
# code coverage (Scala)
59+
# FIXME: downloading project deps is far too slow to include this step
60+
# - name: "Code coverage reports for Scala components"
61+
# working-directory: ./skema/text_reading/scala
62+
# run: |
63+
# sbt clean coverage test
64+
# sbt coverageReport
65+
# sbt coverageAggregate
66+
67+
# docs (other)
68+
- name: "Create documentation (other)"
69+
run: |
70+
mkdocs build -c
71+
- name: Deploy docs
72+
if: github.ref == 'refs/heads/master'
73+
uses: peaceiris/actions-gh-pages@v3
74+
with:
75+
# see https://docs.github.com/en/free-pro-team@latest/actions/reference/authentication-in-a-workflow#about-the-github_token-secret
76+
enable_jekyll: false
77+
github_token: ${{ secrets.GITHUB_TOKEN }}
78+
publish_dir: ./site
79+
destination_dir: "odinson"
80+
user_name: 'github-actions[bot]'
81+
user_email: 'github-actions[bot]@users.noreply.github.com'
82+
commit_message: ${{ github.event.head_commit.message }}
83+
#cname: docs.lum.ai

.gitignore

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,4 @@ tags
3131
.bloop
3232

3333
# docs
34-
docs/.jekyll-cache/
35-
docs/.sass-cache/
36-
docs/_site/
37-
34+
site/

docs/Dockerfile

Lines changed: 0 additions & 2 deletions
This file was deleted.

docs/Gemfile

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)