Skip to content

CI TEST: enable commands #10

CI TEST: enable commands

CI TEST: enable commands #10

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events for the main branch or for release branches
push:
branches:
- 'main'
- 'release/*'
tags:
- '*'
pull_request:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
Build:
runs-on: ubuntu-latest
steps:
- name: Install expect
run: sudo apt-get install -y expect
- name: Checkout
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: 3.10.4
- name: Setup elan toolchain on this build
run: |
curl -O --location https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh
chmod u+x elan-init.sh
./elan-init.sh -y --default-toolchain none
- name: Set elan paths
run: |
echo "$HOME/.elan/bin" >> $GITHUB_PATH
- name: Install lean toolchain for this build
run: |
cd examples
lean --version
- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: '0.4.17'
- name: Install mdbook-wordcount
uses: baptiste0928/cargo-install@v1
with:
crate: mdbook-wordcount
version: latest
- name: Build example code
run: |
cd examples
lake build
- name: Build book
run: |
cd functional-programming-lean
mdbook build
- name: Zip html contents
run: |
cd functional-programming-lean/book/
zip -rq html.zip html/
- name: Release preview zip if a new tag is pushed
uses: softprops/action-gh-release@v1
if: ${{ startsWith(github.ref, 'refs/tags/pre-') }}
with:
files: functional-programming-lean/book/html.zip
token: ${{ secrets.GITHUB_TOKEN }}
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: functional-programming-lean/book/html
publish_branch: gh-pages