Skip to content

Merge pull request #181 from Hirevo/dependabot/cargo/rustix-0.37.27 #98

Merge pull request #181 from Hirevo/dependabot/cargo/rustix-0.37.27

Merge pull request #181 from Hirevo/dependabot/cargo/rustix-0.37.27 #98

Workflow file for this run

name: Docs
on:
# release:
# types: [created]
push:
branches:
- master
jobs:
build_book:
name: Build user docs
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install mdbook
env:
VERSION: v0.3.7
run: |
wget "https://github.com/rust-lang/mdBook/releases/download/${VERSION}/mdbook-${VERSION}-x86_64-unknown-linux-gnu.tar.gz" -O 'mdbook.tar.gz'
tar xvzf mdbook.tar.gz
rm mdbook.tar.gz
./mdbook --version
- name: Build book
run: |
cd docs
../mdbook build
- name: Deploy to GitHub Pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
export COMMIT_HASH="$(echo "${GITHUB_SHA}" | cut -c1-7)"
cd docs/book
git config --global user.email ''
git config --global user.name 'GitHub Actions'
git init
git remote add origin "https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}"
git add --all
git commit -m "Generated docs for ${COMMIT_HASH}"
git push -uf origin master:gh-pages