From af54db8d2e86296b8a73b731148b274599242c2f Mon Sep 17 00:00:00 2001 From: Igor Aleksanov Date: Fri, 1 May 2026 19:59:31 +0400 Subject: [PATCH 1/2] Fix CI more --- .github/workflows/deploy_mdbook.yml | 51 ++++++++++++++++++++++++++--- 1 file changed, 46 insertions(+), 5 deletions(-) diff --git a/.github/workflows/deploy_mdbook.yml b/.github/workflows/deploy_mdbook.yml index 709bd8c..d77c8a8 100644 --- a/.github/workflows/deploy_mdbook.yml +++ b/.github/workflows/deploy_mdbook.yml @@ -1,14 +1,55 @@ +name: mdBook + on: + pull_request: push: branches: - master +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: pages + cancel-in-progress: false + jobs: - ci: - name: CI + build: + name: Build mdBook runs-on: ubuntu-latest + steps: - - uses: actions/checkout@v2 - - uses: XAMPPRocky/deploy-mdbook@v1 + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup mdBook + uses: peaceiris/actions-mdbook@v1 + with: + mdbook-version: latest + + - name: Build book + run: mdbook build + + - name: Upload Pages artifact + if: github.event_name == 'push' && github.ref == 'refs/heads/master' + uses: actions/upload-pages-artifact@v3 with: - token: ${{ secrets.GITHUB_TOKEN }} + path: ./book + + deploy: + name: Deploy to GitHub Pages + needs: build + runs-on: ubuntu-latest + + if: github.event_name == 'push' && github.ref == 'refs/heads/master' + + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + steps: + - name: Deploy + id: deployment + uses: actions/deploy-pages@v4 From 90408c0eaf6eea777bca87cd3e3da992ae392489 Mon Sep 17 00:00:00 2001 From: Igor Aleksanov Date: Mon, 4 May 2026 19:02:29 +0400 Subject: [PATCH 2/2] Update used actions --- .github/workflows/deploy_mdbook.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/deploy_mdbook.yml b/.github/workflows/deploy_mdbook.yml index d77c8a8..c0c0f4a 100644 --- a/.github/workflows/deploy_mdbook.yml +++ b/.github/workflows/deploy_mdbook.yml @@ -22,19 +22,17 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - - name: Setup mdBook - uses: peaceiris/actions-mdbook@v1 - with: - mdbook-version: latest + - uses: Swatinem/rust-cache@v2.9.1 + - run: cargo install mdbook --version 0.5.2 - name: Build book run: mdbook build - name: Upload Pages artifact if: github.event_name == 'push' && github.ref == 'refs/heads/master' - uses: actions/upload-pages-artifact@v3 + uses: actions/upload-pages-artifact@v5 with: path: ./book @@ -52,4 +50,4 @@ jobs: steps: - name: Deploy id: deployment - uses: actions/deploy-pages@v4 + uses: actions/deploy-pages@v5