-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
18 additions
and
5 deletions.
There are no files selected for viewing
23 changes: 18 additions & 5 deletions
23
.github/workflows/deploy-user-guide.yml → .github/workflows/deploy-docs.yml
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 |
---|---|---|
@@ -1,28 +1,41 @@ | ||
name: Deploy User Guide | ||
name: Deploy Documentation | ||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- v1.* | ||
jobs: | ||
deploy-user-guide: | ||
if: github.repository == 'aws/aws-lc-rs' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
persist-credentials: false | ||
- name: Install Rust Toolchain | ||
submodules: 'recursive' | ||
- name: Install Stable Rust Toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
id: toolchain | ||
- name: Install Nightly Rust Toolchain | ||
uses: dtolnay/rust-toolchain@nightly | ||
id: toolchain | ||
- name: Set Rust toolchain override | ||
run: rustup override set ${{ steps.toolchain.outputs.name }} | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: '>=1.18' | ||
- name: Build and Test User Guide | ||
run: | | ||
curl -L https://github.com/rust-lang/mdBook/releases/download/v0.4.34/mdbook-v0.4.34-x86_64-unknown-linux-gnu.tar.gz | tar xz | ||
./mdbook build book | ||
./mdbook test book | ||
- name: Build Documentation | ||
run: cargo +nightly doc --features fips,unstable --no-deps --workspace | ||
- name: Copy docs | ||
run: | | ||
cp --recursive target/doc -t book/book/rustdocs/${{ github.ref_name }} | ||
- name: Deploy User Guide | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
BRANCH: gh-pages | ||
FOLDER: book/book | ||
folder: book/book |