-
Notifications
You must be signed in to change notification settings - Fork 144
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[cheatsheet] Attempt to regenerate cheatsheet automatically
On a commit to the cheatsheet directory, attempt to regenerate the cheatsheet using `pandoc`, commit the changes to https://github.com/hol-theorem-prover/hol-webpages, and update the HOL website.
- Loading branch information
Showing
1 changed file
with
65 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: Regenerate tactic cheatsheet | ||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- 'Manual/Cheatsheet/**' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
|
||
regenerate: | ||
runs-on: ubuntu-latest | ||
env: | ||
COMMIT_MSG: ${{ github.workspace }}/commit_msg.txt | ||
|
||
steps: | ||
- name: Install prerequisites | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y build-essential pandoc curl | ||
- name: Checkout HOL | ||
uses: actions/checkout@v4 | ||
with: | ||
path: hol | ||
|
||
- name: Checkout HOL webpages | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: hol-theorem-prover/hol-webpages | ||
path: hol-webpages | ||
token: ${{ secrets.CHEATSHEET_REGEN }} | ||
|
||
- name: Regenerate cheatsheet | ||
run: | | ||
cd hol/Manual/Cheatsheet | ||
make -f Holmakefile | ||
- name: Copy cheatsheet into HOL webpages | ||
run: | | ||
cp hol/Manual/Cheatsheet/cheatsheet.html hol-webpages/new-look/cheatsheet.html | ||
cp hol/Manual/Cheatsheet/cheatsheet.css hol-webpages/new-look/cheatsheet.css | ||
- name: Compose commit message | ||
env: | ||
HEAD_COMMIT: ${{github.event.head_commit.id}} | ||
AUTHOR: ${{github.event.pusher.username || github.event.pusher.name}} | ||
run: | | ||
echo "[cheatsheet] Regenerate cheatsheet" > $COMMIT_MSG | ||
echo "" >> $COMMIT_MSG | ||
echo "Trigger: head commit HOL-Theorem-Prover/HOL@$HEAD_COMMIT, by $AUTHOR" >> $COMMIT_MSG | ||
- name: Commit changes to HOL webpages | ||
run: | | ||
cd hol-webpages | ||
git config user.name "GitHub Actions" | ||
git config user.email "<>" | ||
git add new-look/cheatsheet.html new-look/cheatsheet.css | ||
git commit --allow-empty --file $COMMIT_MSG | ||
git push | ||
- name: Update HOL webpages | ||
run: | | ||
curl --silent https://hol-theorem-prover.org/update.cgi |