Skip to content

Merge pull request #75 from cyb3rpsych0s1s/chore/tweak-templates #57

Merge pull request #75 from cyb3rpsych0s1s/chore/tweak-templates

Merge pull request #75 from cyb3rpsych0s1s/chore/tweak-templates #57

Workflow file for this run

name: Pages
on:
push:
branches:
- main
paths:
- ".github/**"
- "book.toml"
- "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.34/mdbook-v0.4.34-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.10/mdbook-codeblocks-v0.1.10-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.10.2/mdbook-admonish-v1.10.2-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: |
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/html/* .
git add .
git commit -m "Deploy $GITHUB_SHA to gh-pages"
git push --force --set-upstream origin gh-pages