Skip to content

Commit

Permalink
deploy gh pages (hacspec#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
franziskuskiefer authored Jun 20, 2023
1 parent 7500e3e commit a403012
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 27 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: GH Pages

on:
push:
branches:
- main
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
documentation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2

- name: Build docs
run: RUSTDOCFLAGS="--html-in-header katex-header.html" cargo doc --no-deps

- name: Deploy docs to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: target/doc
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
Cargo.lock
.vscode
target/
67 changes: 40 additions & 27 deletions katex-header.html
Original file line number Diff line number Diff line change
@@ -1,30 +1,43 @@
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity="sha384-9eLZqc9ds8eNjO3TmqPeYcDj8n+Qfa4nuSiGYa6DjLNcv9BtN69ZIulL9+8CqC9Y" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js" integrity="sha384-K3vbOmF2BtaVai+Qk37uypf7VrgBubhQreNQe9aGsz9lB63dIFiQVlJbr92dw2Lx" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js" integrity="sha384-kmZOZB5ObwgQnS/DuDg6TScgOiWWBiVt0plIRkZCmE6rDZGrEOQeHM5PcHi+nyqe" crossorigin="anonymous"></script>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css"
integrity="sha384-9eLZqc9ds8eNjO3TmqPeYcDj8n+Qfa4nuSiGYa6DjLNcv9BtN69ZIulL9+8CqC9Y"
crossorigin="anonymous"
/>
<script
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js"
integrity="sha384-K3vbOmF2BtaVai+Qk37uypf7VrgBubhQreNQe9aGsz9lB63dIFiQVlJbr92dw2Lx"
crossorigin="anonymous"
></script>
<script
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js"
integrity="sha384-kmZOZB5ObwgQnS/DuDg6TScgOiWWBiVt0plIRkZCmE6rDZGrEOQeHM5PcHi+nyqe"
crossorigin="anonymous"
></script>
<script>
document.addEventListener("DOMContentLoaded", function() {
renderMathInElement(document.body, {
delimiters: [
{left: "$$", right: "$$", display: true},
{left: "\\(", right: "\\)", display: false},
{left: "$", right: "$", display: false},
{left: "\\[", right: "\\]", display: true}
],
macros: {
"\\prover": "\\mathcal{P}",
"\\verifier": "\\mathcal{V}",
"\\relation": "\\mathcal{R}",
"\\zero": "\\mathcal{O}",
"\\field": "\\mathbb{F}",
"\\group": "\\mathbb{G}",
"\\halo": "\\mathbf{Halo}",
"\\setup": "\\textrm{Setup}",
"\\pp": "\\textrm{pp}",
"\\innerprod": "\\langle #1,#2 \\rangle",
"\\sec": "\\lambda",
"\\lo": "_\{lo\}",
"\\hi": "_\{hi\}",
}
});
document.addEventListener("DOMContentLoaded", function () {
renderMathInElement(document.body, {
delimiters: [
{ left: "$$", right: "$$", display: true },
{ left: "\\(", right: "\\)", display: false },
{ left: "$", right: "$", display: false },
{ left: "\\[", right: "\\]", display: true },
],
macros: {
"\\prover": "\\mathcal{P}",
"\\verifier": "\\mathcal{V}",
"\\relation": "\\mathcal{R}",
"\\zero": "\\mathcal{O}",
"\\field": "\\mathbb{F}",
"\\group": "\\mathbb{G}",
"\\halo": "\\mathbf{Halo}",
"\\setup": "\\textrm{Setup}",
"\\pp": "\\textrm{pp}",
"\\innerprod": "\\langle #1,#2 \\rangle",
"\\sec": "\\lambda",
"\\lo": "_\{lo\}",
"\\hi": "_\{hi\}",
},
});
});
</script>

0 comments on commit a403012

Please sign in to comment.