Skip to content

Correct identity.md typo #17

Correct identity.md typo

Correct identity.md typo #17

Workflow file for this run

name: Build and deploy
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Checkout deploy branch
uses: actions/checkout@v3
with:
ref: deploy
path: book
- name: Copy .git directory
run: cp -r book/.git .git-book
- name: Download mdBook binaries
env:
MDBOOK_VERSION: v0.4.21
MDBOOK_MERMAID_VERSION: v0.12.3
run: |
mkdir bin
curl -sSL https://github.com/rust-lang/mdBook/releases/download/${MDBOOK_VERSION}/mdbook-${MDBOOK_VERSION}-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=bin
curl -sSL https://github.com/badboy/mdbook-mermaid/releases/download/${MDBOOK_MERMAID_VERSION}/mdbook-mermaid-${MDBOOK_MERMAID_VERSION}-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=bin
echo "${PWD}/bin" >> $GITHUB_PATH
- name: Build
run: |
mdbook-mermaid install .
mdbook build .
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: book-artifacts
path: book/
retention-days: 14
- name: Restore .git directory
run: cp -r .git-book book/.git
- name: Commit build artifacts
if: ${{ github.event_name == 'push' }}
run: |
cd book
git config user.name ${GITHUB_ACTOR}
git config user.email ${GITHUB_ACTOR}@users.noreply.github.com
git add .
git commit -m "Update page"
- name: Push and deploy
if: ${{ github.event_name == 'push' }}
run: |
cd book
REPO="https://${GITHUB_ACTOR}:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git"
git push ${REPO}