Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

feat: add ws subscribe example #50

feat: add ws subscribe example

feat: add ws subscribe example #50

Workflow file for this run

name: book
on:
push:
branches: [master]
paths:
- "book/**"
- "book.toml"
pull_request:
branches: [master]
paths:
- "book/**"
- "book.toml"
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 30
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.21/mdbook-v0.4.21-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook
curl -sSL https://github.com/tommilligan/mdbook-admonish/releases/download/v1.8.0/mdbook-admonish-v1.8.0-x86_64-unknown-linux-gnu.tar.gz| tar -xz --directory=./mdbook
curl -sSL https://github.com/badboy/mdbook-mermaid/releases/download/v0.12.6/mdbook-mermaid-v0.12.6-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook
echo `pwd`/mdbook >> $GITHUB_PATH
- name: Install mdbook-template
run: |
mkdir mdbook-template
curl -sSL https://github.com/sgoudham/mdbook-template/releases/latest/download/mdbook-template-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook-template
echo `pwd`/mdbook-template >> $GITHUB_PATH
- name: Build
run: |
mdbook-admonish install
mdbook-mermaid install
mdbook build
- name: Save pages artifact
uses: actions/upload-pages-artifact@v1
with:
path: target/book
deploy:
# Only deploy if a push to master
if: github.ref_name == 'master' && github.event_name == 'push'
runs-on: ubuntu-latest
timeout-minutes: 30
needs: [build]
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
# reference: https://github.com/actions/deploy-pages
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1