chore(release): 1.16.3 #137
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy website | |
on: | |
push: | |
paths: | |
- "docs/**" | |
pull_request: | |
paths: | |
- "docs/**" | |
jobs: | |
gh-release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Install mdbook | |
run: | | |
mkdir mdbook | |
curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.14/mdbook-v0.4.14-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook | |
curl -sSL https://github.com/avitex/mdbook-tera/releases/download/v0.5.0/mdbook-tera-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook | |
curl -sSL https://github.com/badboy/mdbook-toc/releases/download/0.7.0/mdbook-toc-0.7.0-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook | |
echo `pwd`/mdbook >> $GITHUB_PATH | |
echo `pwd`/mdbook-tera >> $GITHUB_PATH | |
echo `pwd`/mdbook-toc >> $GITHUB_PATH | |
- uses: webfactory/ssh-agent@v0.5.2 | |
with: | |
ssh-private-key: ${{ secrets.GH_ACTIONS_KEY }} | |
- name: Deploy Github Pages | |
env: | |
USE_SSH: true | |
GIT_USER: git | |
run: | | |
cd docs | |
mdbook build | |
git worktree add gh-pages gh-pages | |
git config --global user.email "actions@github.com" | |
git config --global user.name "gh-actions" | |
cd gh-pages | |
git update-ref -d refs/heads/gh-pages | |
rm -rf * | |
mv ../book/* . | |
git add . | |
git commit -m "Deploy $GITHUB_SHA to gh-pages" | |
git push --force |