Skip to content

cargo: bump version to 0.6.1 #11

cargo: bump version to 0.6.1

cargo: bump version to 0.6.1 #11

Workflow file for this run

# SPDX-FileCopyrightText: 2022 Klarälvdalens Datakonsult AB, a KDAB Group company <[email protected]>
# SPDX-FileContributor: Andrew Hayzen <[email protected]>
#
# SPDX-License-Identifier: MIT OR Apache-2.0
name: deploy book
# Automatically deploy the book when a vN.N.N tag occurs on the main branch
on:
push:
# When a tag such as v0.0.1 is pushed then trigger this workflow
tags: v[0-9]+\.[0-9]+\.[0-9]+
jobs:
book:
# Ensure that the tag was from the main branch and not a backport
if: github.event.base_ref == 'refs/heads/main'
runs-on: ubuntu-latest
# Keep in sync with manual-book.yml
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install mdbook and mdbook-linkcheck from binaries
run: |
mkdir mdbook
curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.28/mdbook-v0.4.28-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook
echo `pwd`/mdbook >> $GITHUB_PATH
curl -sSL https://github.com/Michael-F-Bryan/mdbook-linkcheck/releases/latest/download/mdbook-linkcheck.x86_64-unknown-linux-gnu.zip -o mdbook-linkcheck.zip
unzip mdbook-linkcheck.zip -d mdbook-linkcheck/
rm mdbook-linkcheck.zip
chmod +x ./mdbook-linkcheck/mdbook-linkcheck
echo `pwd`/mdbook-linkcheck >> $GITHUB_PATH
- name: Deploy GitHub Pages
run: |
# This assumes your book is in the root of your repository.
# Just add a `cd` here if you need to change to another directory.
cd book/
mdbook build
git worktree add gh-pages gh-pages
git config user.name "Deploy from CI"
git config user.email ""
cd gh-pages
# Delete the ref to avoid keeping history.
git update-ref -d refs/heads/gh-pages
rm -rf *
# We want the book to be in it's own folder
mkdir book/
# We want only the html directory not the linkcheck one
mv ../book/html/* book/
git add .
git commit -m "Deploy $GITHUB_SHA to gh-pages"
git push --force