From 8f91247f102c0b7b5384d9bf5520a7bd02c27908 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Onur=20=C3=96zkan?= Date: Sun, 9 Aug 2026 14:24:50 +0300 Subject: [PATCH] ci: publish documentation site --- .github/workflows/docs.yml | 58 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..ee3ea39 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,58 @@ +name: Documentation + +on: + pull_request: + paths: + - "docs/**" + - ".github/workflows/docs.yml" + push: + branches: [main] + paths: + - "docs/**" + - ".github/workflows/docs.yml" + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + build: + name: Build Markdown manual + runs-on: ubuntu-24.04 + steps: + - name: Check out source + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + + - name: Configure GitHub Pages + uses: actions/configure-pages@v5 + + - name: Install mdBook + run: cargo install mdbook --version 0.5.2 --locked + + - name: Build the site + run: mdbook build docs + + - name: Upload Pages artifact + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + uses: actions/upload-pages-artifact@v4 + with: + path: target/docs + + deploy: + name: Deploy documentation + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + needs: build + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-24.04 + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4