Skip to content

10.6章 insertion-sort #349

10.6章 insertion-sort

10.6章 insertion-sort #349

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: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Install expect
run: sudo apt-get install -y expect
- name: Checkout
uses: actions/checkout@v4
- 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: Build example code
run: |
cd examples
lake build
- name: Build book
run: |
cd functional-programming-lean
mdbook build
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: functional-programming-lean/book/html
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/main'
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v3