Skip to content

Commit 41ea0bc

Browse files
committed
Use leanprover-community/docgen-action
1 parent 96f1df4 commit 41ea0bc

File tree

4 files changed

+71
-242
lines changed

4 files changed

+71
-242
lines changed

.github/workflows/push.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Build Lean project
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
workflow_dispatch:
9+
10+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
11+
permissions:
12+
contents: read
13+
pages: write
14+
id-token: write
15+
16+
jobs:
17+
style_lint:
18+
name: Lint style
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout project
22+
uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
26+
- name: Don't 'import Mathlib', use precise imports
27+
if: always()
28+
run: |
29+
! (find LeanCamCombi -name "*.lean" -type f -print0 | xargs -0 grep -E -n '^import Mathlib$')
30+
31+
- name: Files in LeanCamCombi.Mathlib can't import LeanCamCombi files outside LeanCamCombi.Mathlib
32+
run: |
33+
! (find LeanCamCombi/Mathlib -name "*.lean" -type f -print0 | xargs -0 grep -E -n '^import LeanCamCombi.(?!Mathlib)')
34+
35+
build:
36+
name: Build project
37+
runs-on: ubuntu-latest
38+
steps:
39+
- name: Checkout project
40+
uses: actions/checkout@v5
41+
with:
42+
fetch-depth: 0 # Fetch all history for all branches and tags
43+
44+
- name: Build and lint the project
45+
id: build-lean
46+
uses: leanprover/lean-action@f807b338d95de7813c5c50d018f1c23c9b93b4ec # v1.2.0
47+
48+
- name: Copy README.md to website/index.md
49+
if: github.ref == 'refs/heads/master'
50+
run: cp README.md website/index.md
51+
52+
- name: Upstreaming dashboard
53+
if: github.ref == 'refs/heads/master'
54+
run: |
55+
mkdir -p website/_includes
56+
python3 scripts/upstreaming_dashboard.py
57+
58+
- name: File dependencies
59+
if: github.ref == 'refs/heads/master'
60+
run: |
61+
sudo apt-get update
62+
sudo apt install graphviz -y
63+
~/.elan/bin/lake exe graph website/file_deps.pdf
64+
65+
- name: Build project documentation
66+
if: github.ref == 'refs/heads/master'
67+
id: build-docgen
68+
uses: leanprover-community/docgen-action@main
69+
with:
70+
blueprint: true
71+
homepage: "website"

.github/workflows/push_master.yml

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

.github/workflows/push_pr.yml

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

scripts/build_docs.sh

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

0 commit comments

Comments
 (0)