refactor: index.html #3
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: CI/CD | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
# the OS must be GNU/Linux to be able to use the docker-coq-action | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
image: ['coqorg/coq:8.12'] | |
# the following list must be a singleton (space-separated string) | |
src: ['ilu3_coq_1.v ilu3_coq_2.v ilu3_coq_3.v'] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: coq-community/docker-coq-action@v1 | |
with: | |
custom_image: ${{ matrix.image }} | |
custom_script: | | |
startGroup 'Print opam config' | |
opam config list; opam repo list; opam list | |
endGroup | |
startGroup 'Install Alectryon' | |
sudo apt-get update -y -q | |
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y -q \ | |
python3-pip | |
python3 -m pip install --user --upgrade alectryon | |
endGroup | |
startGroup 'Workaround permissions issue' | |
sudo chown -R coq:coq . | |
# the container user has UID=GID=1000, | |
# while the GHA workdir has (UID=1001, GID=116). | |
endGroup | |
startGroup 'Create output/' | |
mkdir -v output | |
rsync -av static/ output/ | |
endGroup | |
startGroup 'Use Alectryon' | |
for item in ${{ matrix.src }}; do | |
cp -av "src/$item" "output/$item" | |
python3 -m alectryon --frontend coq+rst "src/$item" \ | |
--html-dialect=html5 \ | |
--backend webpage --output-directory output | |
done | |
cat src/self_link.css >>output/docutils_basic.css | |
endGroup | |
- name: Revert permissions | |
# to avoid a warning at cleanup time | |
if: ${{ always() }} | |
run: sudo chown -R 1001:116 . | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./output |