chore: fix "docs ghpages/deploy" ci (#305)

* ci: update toolchain for docs/ghpages ci

* refactor: move the "katex-header.html" file for docs/ghpages ci

* chore: add the html copy/delete process in ci
This commit is contained in:
duguorong009 2024-04-04 14:52:40 +08:00 committed by GitHub
parent 720ba510de
commit b9a057d791
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 20 additions and 2 deletions

View File

@ -12,4 +12,4 @@
]
});
});
</script>
</script>

View File

@ -16,9 +16,17 @@ jobs:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
toolchain: nightly-2023-10-05
override: true
- name: Copy the html file to workspace crates
run: |
for cargo_toml in $(find . -name Cargo.toml); do
crate_dir=$(dirname $cargo_toml)
cp .github/katex-header.html $crate_dir
echo "Copied html file to $crate_dir"
done
- name: Build latest rustdocs
uses: actions-rs/cargo@v1
with:
@ -33,6 +41,14 @@ jobs:
cp -R ./target/doc ./docs
echo "<meta http-equiv=\"refresh\" content=\"0; url=halo2_proofs\">" > ./docs/index.html
- name: Delete the html files copied to every crate
run: |
for cargo_toml in $(find . -name Cargo.toml); do
crate_dir=$(dirname $cargo_toml)
rm -f $crate_dir/katex-header.html
echo "Deleted html file in $crate_dir"
done
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:

View File

@ -1,3 +1,5 @@
#![cfg_attr(docsrs, feature(doc_cfg))]
pub mod circuit;
pub mod dev;
pub mod plonk;