Skip to content

Update mdbook.yaml

Update mdbook.yaml #8

Workflow file for this run

name: Publish Documentation
on:
push:
branches: ["main"]
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build-and-publish-book:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install mdbook
run: |
mkdir mdbook
curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.34/mdbook-v0.4.34-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook
echo `pwd`/mdbook >> $GITHUB_PATH
run: cargo install --locked --force mdbook@0.4.34 mdbook-admonish@1.10.2 mdbook-variables@0.2.2 mdbook-toc@0.14.1 mdbook-pagetoc@0.1.7
- name: Deploy Book to GitHub Pages
run: |
# Build the HTML content
mdbook build -d book/ docs/
# Create and switch to the gh-pages work tree
git worktree add gh-pages gh-pages
cd $GITHUB_WORKSPACE/gh-pages
git config user.name "GitHub Actions"
git config user.email "oci-dax-tools_ww@oracle.com"
# Delete the ref to avoid keeping history.
git update-ref -d refs/heads/gh-pages
rm -rf *
mv $GITHUB_WORKSPACE/docs/book/* $GITHUB_WORKSPACE/gh-pages
touch $GITHUB_WORKSPACE/gh-pages/.nojekyll
git add .
git commit -m "Deploy $GITHUB_SHA to gh-pages"
git push --force-with-lease