bookshelf-doc/.github/workflows/build.yml

54 lines
1.5 KiB
YAML
Raw Normal View History

name: build and deploy docs
on:
schedule:
2022-12-13 18:36:47 +00:00
- cron: '0 */8 * * *' # every 8 hours
push:
branches:
- "main"
pull_request:
jobs:
build:
name: build and deploy docs
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: install elan
run: |
set -o pipefail
curl https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh -sSf | sh -s -- --default-toolchain none -y
~/.elan/bin/lean --version
echo "$HOME/.elan/bin" >> $GITHUB_PATH
2023-01-04 22:40:48 +00:00
- name: Compile doc-gen4
run: |
lake build
- name: Checkout and compile mathlib4
run: |
cd ../
git clone https://github.com/leanprover-community/mathlib4
cd mathlib4
2023-01-04 22:25:35 +00:00
lake exe cache get
lake build
2022-10-05 11:00:43 +00:00
- name: generate docs (PRs only)
if: github.event_name == 'pull_request'
run: |
cd ../
2022-10-05 11:00:43 +00:00
./doc-gen4/deploy_docs.sh "mathlib4" "doc-gen4" "false" "LeanInk"
env:
DOC_GEN_REF: ${{ github.event.pull_request.head.sha }}
2022-10-05 11:00:43 +00:00
2023-01-01 21:15:08 +00:00
- name: generate and deploy docs (main only)
2023-01-02 09:07:10 +00:00
if: (github.event_name == 'push' || github.event_name == 'schedule') && github.repository == 'leanprover/doc-gen4' && github.ref_name == 'main'
2022-10-05 11:00:43 +00:00
run: |
cd ../
./doc-gen4/deploy_docs.sh "mathlib4" "doc-gen4" "true" "LeanInk"
env:
MATHLIB4_DOCS_KEY: ${{ secrets.MATHLIB4_DOCS_KEY }}
2023-01-01 19:37:05 +00:00
DOC_GEN_REF: ${{ github.sha }}