Skip to content

Commit

Permalink
Update ci_build.yaml (#219)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ailrun authored Sep 19, 2024
1 parent 709bfe1 commit 38b487a
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/ci_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ jobs:
packages: read
contents: write
steps:
- name: get number of CPU cores
- name: Get number of CPU cores
uses: SimenB/github-actions-cpu-cores@v2
id: cpu-cores

- name: repo checkout
- name: Checkout repo
uses: actions/checkout@v4

- name: Initialise variables
Expand All @@ -52,17 +52,17 @@ jobs:
echo "DOC_DEPLOY=false" >> $GITHUB_ENV
fi
- name: container registry log in
- name: Log in container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: image pre-pulling
- name: Pre-pull docker image
run: docker pull ${{ env.REGISTRY }}/${{ env.IMAGE_TAG }}

- name: coq processing
- name: Process main steps
uses: coq-community/docker-coq-action@v1
with:
custom_image: ${{ env.REGISTRY }}/${{ env.IMAGE_TAG }}
Expand All @@ -78,6 +78,15 @@ jobs:
make coqdoc
fi
endGroup
startGroup "Build HTMLs for GitHub pages"
if [[ "${{ env.DOC_DEPLOY }}" == 'true' ]]; then
make coqdoc
mv theories/html html
cp assets/styling.css html/styling.css
cp -r assets/images html/images
pandoc README.md -H assets/include.html --no-highlight --metadata pagetitle='McLTT: A Bottom-up Approach to Implementing A Proof Assistant' -t html --css styling.css -o html/index.html
fi
endGroup
startGroup "Run inline tests"
dune runtest
endGroup
Expand All @@ -89,21 +98,12 @@ jobs:
OPAMJOBS: ${{ steps.cpu-cores.outputs.count }}
OPAMYES: "true"

- name: permissions revert
- name: Revert permissions
# to avoid a warning at cleanup time
if: ${{ always() }}
run: sudo chown -R 1001:116 .

- name: generate Github pages
if: ${{ success() && env.DOC_DEPLOY == 'true' }}
run: |
sudo apt install -y pandoc
mv theories/html html
cp assets/styling.css html/styling.css
cp -r assets/images html/images
pandoc README.md -H assets/include.html --no-highlight --metadata pagetitle='McLTT: A Bottom-up Approach to Implementing A Proof Assistant' -t html --css styling.css -o html/index.html
- name: Deploy HTML
- name: Deploy GitHub pages
uses: JamesIves/[email protected]
if: ${{ success() && env.DOC_DEPLOY == 'true' }}
with:
Expand Down

0 comments on commit 38b487a

Please sign in to comment.