forked from zcash/halo2
-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #204 from thogiti/host-docs-ghpages
Host docs ghpages
- Loading branch information
Showing
1 changed file
with
41 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,41 @@ | ||
name: halo2 docs ghpages | ||
# Setup docs for ghpages | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- uses: actions/checkout@v3 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly | ||
override: true | ||
|
||
- name: Build latest rustdocs | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: doc | ||
args: --no-deps --all-features --workspace | ||
env: | ||
RUSTDOCFLAGS: -Z unstable-options --enable-index-page --cfg docsrs --html-in-header ${{ github.workspace }}/halo2_proofs/katex-header.html | ||
|
||
- name: Create the required index page and move the latest rustdocs into docs | ||
run: | | ||
rm -rf ./docs | ||
cp -R ./target/doc ./docs | ||
echo "<meta http-equiv=\"refresh\" content=\"0; url=pse_halo2\">" > ./docs/index.html | ||
- name: Deploy to GitHub Pages | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./docs | ||
|