From f5e440897b23496303d7a0ea6999777a8cfe5c2b Mon Sep 17 00:00:00 2001 From: Ryan Brue Date: Tue, 17 Sep 2024 00:41:24 -0500 Subject: [PATCH] init mdbook Signed-off-by: Ryan Brue --- .github/workflows/build_website.yml | 29 -------------------------- .github/workflows/docs.yml | 29 ++++++++++++++++++++++++++ docs/.gitignore | 1 + docs/book.toml | 6 ++++++ docs/src/SUMMARY.md | 4 ++++ docs/{ => src}/building-and-testing.md | 0 docs/{ => src}/index.md | 0 7 files changed, 40 insertions(+), 29 deletions(-) delete mode 100644 .github/workflows/build_website.yml create mode 100644 .github/workflows/docs.yml create mode 100644 docs/.gitignore create mode 100644 docs/book.toml create mode 100644 docs/src/SUMMARY.md rename docs/{ => src}/building-and-testing.md (100%) rename docs/{ => src}/index.md (100%) diff --git a/.github/workflows/build_website.yml b/.github/workflows/build_website.yml deleted file mode 100644 index 90dca3f..0000000 --- a/.github/workflows/build_website.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: deploy website - -on: - workflow_dispatch: - push: - branches: - - master # Run the action on pushes to the main branch - -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Set up Cargo - run: sudo apt-get install cargo - - - name: Install simple-ssg - run: cargo install simple-ssg - - - name: Generate static site - run: ~/.cargo/bin/simple-ssg -t github-markdown --clean ./docs -o ./output - - - name: Deploy to GitHub Pages - uses: peaceiris/actions-gh-pages@v4 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./output diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..4f5c01e --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,29 @@ +name: github pages + +on: + push: + branches: + - master + pull_request: + +jobs: + deploy: + runs-on: ubuntu-20.04 + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + steps: + - uses: actions/checkout@v2 + + - name: Setup mdBook + uses: peaceiris/actions-mdbook@v2 + with: + mdbook-version: 'latest' + + - run: mdbook build docs + + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + if: ${{ github.ref == 'refs/heads/main' }} + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./docs/book \ No newline at end of file diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 0000000..7585238 --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1 @@ +book diff --git a/docs/book.toml b/docs/book.toml new file mode 100644 index 0000000..404e968 --- /dev/null +++ b/docs/book.toml @@ -0,0 +1,6 @@ +[book] +authors = ["Ryan Brue"] +language = "en" +multilingual = false +src = "src" +title = "rbshell - A wayland shell" diff --git a/docs/src/SUMMARY.md b/docs/src/SUMMARY.md new file mode 100644 index 0000000..e1ce249 --- /dev/null +++ b/docs/src/SUMMARY.md @@ -0,0 +1,4 @@ +# Summary + +- [Introduction](./index.md) +- [Building and testing](./building-and-testing.md) diff --git a/docs/building-and-testing.md b/docs/src/building-and-testing.md similarity index 100% rename from docs/building-and-testing.md rename to docs/src/building-and-testing.md diff --git a/docs/index.md b/docs/src/index.md similarity index 100% rename from docs/index.md rename to docs/src/index.md