44 push :
55 branches :
66 - master
7+ pull_request :
8+ workflow_dispatch :
79
810# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
911permissions :
@@ -30,97 +32,40 @@ jobs:
3032 run : |
3133 ! (find PersistentDecomp/Mathlib -name "*.lean" -type f -print0 | xargs -0 grep -E -n '^import PersistentDecomp.(?!Mathlib)')
3234
33- build_project :
34- runs-on : ubuntu-latest
35+ build :
3536 name : Build project
37+ runs-on : ubuntu-latest
3638 steps :
37-
38- # The following actions make sure the project builds properly.
39-
4039 - name : Checkout project
41- uses : actions/checkout@v4
40+ uses : actions/checkout@v5
4241 with :
43- fetch-depth : 0
44-
45- - name : Install elan
46- run : curl https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh -sSf | sh -s -- -y --default-toolchain leanprover/lean4:4.18.0
47-
48- - name : Get cache
49- run : ~/.elan/bin/lake exe cache get || true
42+ fetch-depth : 0 # Fetch all history for all branches and tags
5043
51- - name : Build project
52- run : ~/.elan/bin/lake build PersistentDecomp
53-
54- - name : Cache documentation
55- uses : actions/cache@v4
56- with :
57- path : |
58- website/docs
59- !website/docs/PersistentDecomp
60- key : Doc-${{ hashFiles('lake-manifest.json') }}
61- restore-keys : Doc-
62-
63- - name : Build documentation
64- run : scripts/build_docs.sh
65-
66- # - name: Build blueprint
67- # uses: xu-cheng/texlive-action@v2
68- # with:
69- # docker_image: ghcr.io/xu-cheng/texlive-full:20231201
70- # run: |
71- # # Install necessary dependencies and build the blueprint
72- # apk update
73- # apk add --update make py3-pip git pkgconfig graphviz graphviz-dev gcc musl-dev
74- # git config --global --add safe.directory $GITHUB_WORKSPACE
75- # git config --global --add safe.directory `pwd`
76- # python3 -m venv env
77- # source env/bin/activate
78- # pip install --upgrade pip requests wheel
79- # pip install pygraphviz --global-option=build_ext --global-option="-L/usr/lib/graphviz/" --global-option="-R/usr/lib/graphviz/"
80- # pip install leanblueprint
81- # leanblueprint pdf
82- # leanblueprint web
83-
84- # The following actions create and deploy the website.
85-
86- - name : Copy documentation to website/docs
87- run : mv docs/build/* website/docs
88-
89- # - name: Copy blueprint to website/blueprint
90- # run: |
91- # cp blueprint/print/print.pdf website/blueprint.pdf
92- # cp -r blueprint/web website/blueprint
44+ - name : Build and lint the project
45+ id : build-lean
46+ uses : leanprover/lean-action@f807b338d95de7813c5c50d018f1c23c9b93b4ec # v1.2.0
9347
9448 - name : Copy README.md to website/index.md
49+ if : github.ref == 'refs/heads/master'
9550 run : cp README.md website/index.md
9651
9752 - name : Upstreaming dashboard
53+ if : github.ref == 'refs/heads/master'
9854 run : |
9955 mkdir -p website/_includes
10056 python3 scripts/upstreaming_dashboard.py
10157
10258 - name : File dependencies
59+ if : github.ref == 'refs/heads/master'
10360 run : |
10461 sudo apt-get update
10562 sudo apt install graphviz -y
10663 ~/.elan/bin/lake exe graph website/file_deps.pdf
10764
108- - name : Bundle dependencies
109- uses : ruby/setup-ruby@v1
65+ - name : Build project documentation
66+ if : github.ref == 'refs/heads/master'
67+ id : build-docgen
68+ uses : leanprover-community/docgen-action@main
11069 with :
111- working-directory : website
112- ruby-version : " 3.1" # Not needed with a .ruby-version file
113- bundler-cache : true # runs 'bundle install' and caches installed gems automatically
114-
115- - name : Bundle website
116- working-directory : website
117- run : JEKYLL_ENV=production bundle exec jekyll build
118-
119- - name : Upload docs & blueprint artifact
120- uses : actions/upload-pages-artifact@v3
121- with :
122- path : website/_site
123-
124- - name : Deploy to GitHub Pages
125- id : deployment
126- uses : actions/deploy-pages@v4
70+ blueprint : true
71+ homepage : " website"
0 commit comments