Skip to content

Merge pull request #100 from cyb3rpsych0s1s/feat/chinese #80

Merge pull request #100 from cyb3rpsych0s1s/feat/chinese

Merge pull request #100 from cyb3rpsych0s1s/feat/chinese #80

Workflow file for this run

name: Pages
on:
push:
branches:
- main
paths:
- ".github/**"
- "book/book.toml"
- "book/pages/**"
- "**.md"
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install mdbook
run: |
mkdir mdbook
curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.36/mdbook-v0.4.36-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook
echo `pwd`/mdbook >> $GITHUB_PATH
- name: Install mdbook-codeblocks
run: |
mkdir mdbook-codeblocks
curl -sSL https://github.com/Roms1383/mdbook-codeblocks/releases/download/v0.1.12/mdbook-codeblocks-v0.1.12-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook-codeblocks
echo `pwd`/mdbook-codeblocks >> $GITHUB_PATH
- name: Install mdbook-admonish
run: |
mkdir mdbook-admonish
curl -sSL https://github.com/tommilligan/mdbook-admonish/releases/download/v1.14.0/mdbook-admonish-v1.14.0-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook-codeblocks
echo `pwd`/mdbook-admonish >> $GITHUB_PATH
- name: Setup rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Deploy GitHub Pages
run: |
(cd book && mdbook build)
git worktree add 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 *
mv ../book/site/html/* .
git add .
git commit -m "Deploy $GITHUB_SHA to gh-pages"
git push --force --set-upstream origin gh-pages