Various updates (closes TelegramBots/Telegram.Bot#1432) #262
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 /property:Configuration=Release | |
- name: Build | |
run: dotnet build --configuration Release --no-restore | |
- name: Install mdbook and cargo-binstall binaries | |
uses: taiki-e/install-action@v2 | |
with: | |
tool: mdbook,cargo-binstall | |
- name: Install mdbook extensions | |
run: cargo binstall -y mdbook-mermaid mdbook-alerts mdbook-toc | |
# - name: Setup mdBook | |
# uses: peaceiris/actions-mdbook@v2 | |
# with: | |
# mdbook-version: '0.4.36' | |
# - run: cargo install mdbook-alerts | |
# - 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 |