Skip to content

Update actions/checkout digest to 0ad4b8f #223

Update actions/checkout digest to 0ad4b8f

Update actions/checkout digest to 0ad4b8f #223

Workflow file for this run

name: mdbook
on:
push:
branches:
- main
pull_request:
jobs:
mdbook:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
with:
fetch-depth: 0
- name: setup mdbook
uses: peaceiris/[email protected]
with:
mdbook-version: 'latest'
- name: preprocess
shell: bash
run: ./prepro.sh
- name: build
run: mdbook build
- name: prepare deploy
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git worktree add gh-pages gh-pages
cd gh-pages
# Delete the ref to avoid keeping history.
git update-ref -d refs/heads/gh-pages
rm -rf ./*
mv ../book/* .
git add .
git commit -m "Deploy $GITHUB_SHA to gh-pages"
- name: deploy
if: ${{ github.ref == 'refs/heads/main' }}
working-directory: ./gh-pages
run: |
git push -f origin gh-pages