Merge pull request #28 from kth-step/stdpp-countable #83
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Deploy documentation | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- '**' | |
jobs: | |
build-coqdoc: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Git repository | |
uses: actions/checkout@v4 | |
- name: Build coqdoc | |
uses: coq-community/docker-coq-action@v1 | |
with: | |
custom_image: 'coqorg/coq:8.19' | |
custom_script: | | |
{{before_install}} | |
startGroup "Build dependencies" | |
sudo apt-get update -y -q | |
sudo apt-get install texlive-latex-extra -y -q | |
opam pin add -n -y -k path coq-abs-metatheory . | |
opam update -y | |
opam install -y -j "$(nproc)" coq-abs-metatheory --deps-only | |
opam install -y -j "$(nproc)" ott | |
endGroup | |
startGroup "Add permissions" | |
sudo chown -R coq:coq . | |
endGroup | |
startGroup "Build abs-metatheory" | |
make -j "$(nproc)" | |
endGroup | |
startGroup "Build coqdoc" | |
make coqdoc | |
endGroup | |
startGroup "Build report" | |
make docs/report/main.pdf | |
endGroup | |
- name: Revert Coq user permissions | |
# to avoid a warning at cleanup time | |
if: ${{ always() }} | |
run: sudo chown -R 1001:116 . | |
- name: Copy HTML and CSS and JavaScript | |
run: | | |
mkdir -p public/docs/report | |
cp resources/index.html public/ | |
cp -r docs/coqdoc public/docs | |
cp docs/report/main.pdf public/docs/report | |
- name: Deploy to GitHub pages | |
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
uses: crazy-max/ghaction-github-pages@v4 | |
with: | |
build_dir: public | |
jekyll: false | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |