name: build and deploy docs on: schedule: - cron: '0 */2 * * *' # every 2 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 - name: Checkout and compile mathlib4 run: | cd ../ git clone https://github.com/leanprover-community/mathlib4 cd mathlib4 lake build - name: generate docs (PRs only) if: github.event_name == 'pull_request' run: | cd ../ ./doc-gen4/deploy_docs.sh "mathlib4" "doc-gen4" "false" "LeanInk" env: DOC_GEN_REF: ${{ github.event.pull_request.head.sha }} - name: generate and deploy docs (master only) if: (github.event_name == 'push' || github.event_name == 'schedule') && github.repository == 'leanprover/doc-gen4' run: | cd ../ ./doc-gen4/deploy_docs.sh "mathlib4" "doc-gen4" "true" "LeanInk" env: MATHLIB4_DOCS_KEY: ${{ secrets.MATHLIB4_DOCS_KEY }} DOC_GEN_REF: "main"