add mdbook--alerts #191
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: Generate ebook | |
on: ['push'] | |
jobs: | |
ebook: | |
name: Build and upload | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 6.0.x | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --configuration Release --no-restore | |
- name: Install mdBook | |
run: | | |
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf -y | sh | |
rustup update | |
cargo install --force --version ${MDBOOK_VERSION} mdbook | |
cargo install --force mdbook-alerts | |
- name: Setup Pages | |
id: pages | |
uses: actions/configure-pages@v4 | |
# - name: Setup mdBook | |
# uses: peaceiris/actions-mdbook@v2 | |
# with: | |
# mdbook-version: '0.4.35' | |
- name: Setup nodejs | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '18' | |
# - name: Setup linter and spellchecker cli | |
# run: npm install --location=global markdownlint-cli cspell | |
# - name: Lint markdown files | |
# run: markdownlint src/**/*.md | |
# - name: Run spellcheck | |
# run: cspell src/**/*.md | |
- name: Build the book | |
run: mdbook build | |
- name: Deploy to Github Pages | |
uses: peaceiris/actions-gh-pages@v4 | |
if: ${{ github.ref == 'refs/heads/master' }} | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./book |