Skip to content

docs: explain how RandomMocker can be used #14

docs: explain how RandomMocker can be used

docs: explain how RandomMocker can be used #14

Workflow file for this run

name: Deploy mdBook site to Pages
on:
push:
branches: ["main"]
# only when `docs/` changes
paths: ["docs/**"]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
fetch-depth: 0
- name: Install latest mdbook
run: |
tag=$(curl 'https://api.github.com/repos/rust-lang/mdbook/releases/latest' | jq -r '.tag_name')
mdbook_url="https://github.com/rust-lang/mdbook/releases/download/${tag}/mdbook-${tag}-x86_64-unknown-linux-gnu.tar.gz"
admonish_url="https://github.com/tommilligan/mdbook-admonish/releases/download/v1.14.0/mdbook-admonish-v1.14.0-x86_64-unknown-linux-gnu.tar.gz"
mkdir mdbook
curl -sSL $mdbook_url | tar -xz --directory=./mdbook
curl -sSL $admonish_url | tar -xz --directory=./mdbook
echo `pwd`/mdbook >> $GITHUB_PATH
- name: Build Book
run: |
mdbook build
- name: Setup Pages
uses: actions/configure-pages@b8130d9ab958b325bbde9786d62f2c97a9885a0e # v3
- name: Upload artifact
uses: actions/upload-pages-artifact@a753861a5debcf57bf8b404356158c8e1e33150c # v2
with:
# Upload entire repository
path: "book"
# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@de14547edc9944350dc0481aa5b7afb08e75f254 # v2