Skip to content

build(deps): Update Rust crate clap to v4.5.24 #605

build(deps): Update Rust crate clap to v4.5.24

build(deps): Update Rust crate clap to v4.5.24 #605

Workflow file for this run

name: github pages
on:
push:
branches:
- master
tags:
- v*
jobs:
deploy:
runs-on: ubuntu-latest
concurrency:
group: github-pages-deploy-${{ github.ref }}
cancel-in-progress: false
steps:
- uses: actions/checkout@v4
- name: Install stable toolchain
id: toolchain
uses: dtolnay/rust-toolchain@stable
- run: rustup override set ${{steps.toolchain.outputs.name}}
- run: rustup component add rustfmt
- run: |
MDBOOK_VERSION=$(grep -A 1 'name = "mdbook"' Cargo.lock | grep 'version' | awk -F '"' '{print $2}')
cargo install mdbook --version ${MDBOOK_VERSION}
GH_PAGES_DIR=./rash_book/rash-sh.github.io
git clone --depth=1 https://github.com/rash-sh/rash-sh.github.io.git $GH_PAGES_DIR
# Strip git ref prefix from version
FULL_VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip patch from version
VERSION=$(echo "${FULL_VERSION}" | sed 's/^v\([0-9]\+\)\.\([0-9]\+\)\.[0-9]\+/v\1.\2/')
VERSION=$VERSION make book
# update _data/projects.json
cd $GH_PAGES_DIR
make _data/projects.json
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
with:
personal_token: ${{ secrets.PAT_GITHUB }}
publish_dir: ./rash_book/rash-sh.github.io
publish_branch: master
external_repository: rash-sh/rash-sh.github.io
enable_jekyll: true