diff --git a/.github/workflows/doc.yaml b/.github/workflows/doc.yaml new file mode 100644 index 0000000..2191b06 --- /dev/null +++ b/.github/workflows/doc.yaml @@ -0,0 +1,41 @@ +name: Deploy docs + +on: + push: + branches: ["main"] + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Pages + uses: actions/configure-pages@v5 + - name: Install mdBook + run: | + cargo install mdbook --no-default-features --features search --vers "^0.4" --locked + - name: Build mdBook + run: | + cd doc + mdbook build + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: './doc/book' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/docs/.gitignore b/doc/.gitignore similarity index 100% rename from docs/.gitignore rename to doc/.gitignore diff --git a/docs/book.toml b/doc/book.toml similarity index 100% rename from docs/book.toml rename to doc/book.toml diff --git a/docs/src/SUMMARY.md b/doc/src/SUMMARY.md similarity index 100% rename from docs/src/SUMMARY.md rename to doc/src/SUMMARY.md diff --git a/docs/src/advanced.md b/doc/src/advanced.md similarity index 100% rename from docs/src/advanced.md rename to doc/src/advanced.md diff --git a/docs/src/faq.md b/doc/src/faq.md similarity index 100% rename from docs/src/faq.md rename to doc/src/faq.md diff --git a/docs/src/flake-option.md b/doc/src/flake-option.md similarity index 100% rename from docs/src/flake-option.md rename to doc/src/flake-option.md diff --git a/docs/src/minimal-setup.md b/doc/src/minimal-setup.md similarity index 100% rename from docs/src/minimal-setup.md rename to doc/src/minimal-setup.md diff --git a/docs/src/nixos-option.md b/doc/src/nixos-option.md similarity index 100% rename from docs/src/nixos-option.md rename to doc/src/nixos-option.md diff --git a/docs/src/prerequisits.md b/doc/src/prerequisits.md similarity index 100% rename from docs/src/prerequisits.md rename to doc/src/prerequisits.md diff --git a/docs/src/setup.md b/doc/src/setup.md similarity index 100% rename from docs/src/setup.md rename to doc/src/setup.md