Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
nwagner84 committed Sep 24, 2023
1 parent c8fabb5 commit 72944ec
Showing 1 changed file with 69 additions and 79 deletions.
148 changes: 69 additions & 79 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ jobs:
cargo udeps --workspace
audit:
# if: ${{ github.ref == 'refs/heads/main' }}
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
needs: test
steps:
Expand All @@ -232,7 +232,7 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}

upgrades:
# if: ${{ github.ref == 'refs/heads/main' }}
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
needs: test
steps:
Expand Down Expand Up @@ -291,81 +291,71 @@ jobs:
env:
MIRIFLAGS: -Zmiri-strict-provenance

# book:
# if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
# runs-on: ubuntu-latest
# needs: test
# steps:
# - uses: actions/checkout@v3
# - uses: abbbi/github-actions-tune@v1
# - uses: actions/cache@v2
# with:
# key: ${{ env.CACHE_KEY }}-${{ hashFiles('**/Cargo.toml') }}
# path: |
# ~/.cargo/bin/
# ~/.cargo/git/db/
# ~/.cargo/registry/cache/
# ~/.cargo/registry/index/
# target/
# - uses: actions-rs/toolchain@v1
# with:
# profile: minimal
# toolchain: nightly
# override: true
# - uses: actions-rs/[email protected]
# with:
# version: latest
# crate: mdbook
# - run: |
# mdbook build docs/book
# mdbook test docs/book
book:
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v4
- uses: abbbi/github-actions-tune@v1
- uses: actions/cache@v3
with:
key: ${{ env.CACHE_KEY }}-${{ hashFiles('**/Cargo.toml') }}
path: |
~/.cargo/bin/
~/.cargo/git/db/
~/.cargo/registry/cache/
~/.cargo/registry/index/
target/
- uses: dtolnay/rust-toolchain@nightly
- name: "Install `mdbook`"
run: |
cargo install -f mdbook
- run: |
mdbook build docs/book
mdbook test docs/book
# gh-pages:
# if: ${{ github.ref == 'refs/heads/main' }}
# needs:
# - audit
# - book
# - check
# - clippy
# - cross
# - deny
# - fmt
# - fuzz
# - miri
# - test
# # - udeps
# - upgrades
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - uses: abbbi/github-actions-tune@v1
# - uses: actions/cache@v2
# with:
# key: ${{ env.CACHE_KEY }}-${{ hashFiles('**/Cargo.toml') }}
# path: |
# ~/.cargo/bin/
# ~/.cargo/git/db/
# ~/.cargo/registry/cache/
# ~/.cargo/registry/index/
# target/
# - uses: actions-rs/toolchain@v1
# with:
# profile: minimal
# toolchain: nightly
# override: true
# - uses: actions-rs/[email protected]
# with:
# version: latest
# crate: mdbook
# - run: |
# mkdir -p target/docs
# cargo doc --all --no-deps --workspace --target-dir target/docs/api
# mdbook build docs/book --dest-dir ../../target/docs/book
# echo '<meta http-equiv="refresh" content="0; url=doc/pica/index.html"><a href=doc/pica/index.html">Redirect</a>' >> target/docs/api/index.html
# echo '<meta http-equiv="refresh" content="0; url=book/index.html"><a href=book/index.html">Redirect</a>' >> target/docs/index.html
# - uses: peaceiris/actions-gh-pages@v3
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# publish_dir: target/docs
# keep_files: false
# force_orphan: true
gh-pages:
if: ${{ github.ref == 'refs/heads/main' }}
needs:
- audit
- book
- check
- clippy
- cross
- deny
- fmt
- fuzz
- miri
- test
# - udeps
- upgrades
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: abbbi/github-actions-tune@v1
- uses: actions/cache@v3
with:
key: ${{ env.CACHE_KEY }}-${{ hashFiles('**/Cargo.toml') }}
path: |
~/.cargo/bin/
~/.cargo/git/db/
~/.cargo/registry/cache/
~/.cargo/registry/index/
target/
- uses: dtolnay/rust-toolchain@nightly
- name: "Install `mdbook`"
run: |
cargo install -f mdbook
- run: |
mkdir -p target/docs
cargo doc --all --no-deps --workspace --target-dir target/docs/api
mdbook build docs/book --dest-dir ../../target/docs/book
echo '<meta http-equiv="refresh" content="0; url=doc/pica/index.html"><a href=doc/pica/index.html">Redirect</a>' >> target/docs/api/index.html
echo '<meta http-equiv="refresh" content="0; url=book/index.html"><a href=book/index.html">Redirect</a>' >> target/docs/index.html
- uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: target/docs
keep_files: false
force_orphan: true

0 comments on commit 72944ec

Please sign in to comment.