From 24faa072bb6493bff6585667e99e0dea1af6429a Mon Sep 17 00:00:00 2001 From: makspll Date: Tue, 3 Dec 2024 10:55:45 +0000 Subject: [PATCH 1/8] init mdbook --- docs/.gitignore | 1 + docs/book.toml | 6 ++++++ docs/src/SUMMARY.md | 3 +++ docs/src/chapter_1.md | 3 +++ 4 files changed, 13 insertions(+) create mode 100644 docs/.gitignore create mode 100644 docs/book.toml create mode 100644 docs/src/SUMMARY.md create mode 100644 docs/src/chapter_1.md diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 0000000000..e9c072897d --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1 @@ +book \ No newline at end of file diff --git a/docs/book.toml b/docs/book.toml new file mode 100644 index 0000000000..dafeadc13d --- /dev/null +++ b/docs/book.toml @@ -0,0 +1,6 @@ +[book] +authors = ["makspll"] +language = "en" +multilingual = false +src = "src" +title = "Bevy Scripting" diff --git a/docs/src/SUMMARY.md b/docs/src/SUMMARY.md new file mode 100644 index 0000000000..7390c82896 --- /dev/null +++ b/docs/src/SUMMARY.md @@ -0,0 +1,3 @@ +# Summary + +- [Chapter 1](./chapter_1.md) diff --git a/docs/src/chapter_1.md b/docs/src/chapter_1.md new file mode 100644 index 0000000000..90bb5a8645 --- /dev/null +++ b/docs/src/chapter_1.md @@ -0,0 +1,3 @@ +# Chapter 1 + +Welcome to the greatest documentation of all time WIP \ No newline at end of file From 6e594caa24b26199e96498496fa1f50bdff0123f Mon Sep 17 00:00:00 2001 From: makspll Date: Tue, 3 Dec 2024 11:12:17 +0000 Subject: [PATCH 2/8] Add workflow --- .github/workflows/bevy_mod_scripting.yml | 1 + .github/workflows/mdbook.yml | 35 ++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 .github/workflows/mdbook.yml diff --git a/.github/workflows/bevy_mod_scripting.yml b/.github/workflows/bevy_mod_scripting.yml index 36ff0cb733..92497dee1d 100644 --- a/.github/workflows/bevy_mod_scripting.yml +++ b/.github/workflows/bevy_mod_scripting.yml @@ -8,6 +8,7 @@ on: - '.github/workflows/release-plz.yml' - '.github/workflows/bevy_api_gen.yml' - '.github/workflows/macro_tests.yml' + - 'docs/**' name: Check and Lint - bevy_mod_scripting diff --git a/.github/workflows/mdbook.yml b/.github/workflows/mdbook.yml new file mode 100644 index 0000000000..36ea7397df --- /dev/null +++ b/.github/workflows/mdbook.yml @@ -0,0 +1,35 @@ +name: Deploy mdBook to GitHub Pages + +on: + push: + branches: + - "**" + paths: + - 'docs/**' + +jobs: + + build: + name: Build Book - mdbook + runs-on: ubuntu-latest + env: + working-directory: docs/src + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + components: mdbook + override: true + + - name: Build the book + run: mdbook build + + - name: Deploy to GitHub Pages + if: github.ref == 'refs/heads/main' + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: book \ No newline at end of file From 9c9aee2d3b7dc75fa37c379ccd7c934cfefc5b80 Mon Sep 17 00:00:00 2001 From: makspll Date: Tue, 3 Dec 2024 11:18:28 +0000 Subject: [PATCH 3/8] trigger ci --- docs/src/chapter_1.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/src/chapter_1.md b/docs/src/chapter_1.md index 90bb5a8645..1259c54e97 100644 --- a/docs/src/chapter_1.md +++ b/docs/src/chapter_1.md @@ -1,3 +1,6 @@ # Chapter 1 + +## Introduction + Welcome to the greatest documentation of all time WIP \ No newline at end of file From 4e3623fbdae80350e889937de3bbba63969877b7 Mon Sep 17 00:00:00 2001 From: makspll Date: Tue, 3 Dec 2024 11:26:07 +0000 Subject: [PATCH 4/8] fix install --- .github/workflows/mdbook.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/mdbook.yml b/.github/workflows/mdbook.yml index 36ea7397df..3891bcc760 100644 --- a/.github/workflows/mdbook.yml +++ b/.github/workflows/mdbook.yml @@ -15,14 +15,14 @@ jobs: env: working-directory: docs/src steps: + - name: Checkout repository uses: actions/checkout@v4 - + - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - components: mdbook - override: true + + - name: Install mdBook + run: cargo install mdbook - name: Build the book run: mdbook build From e5327d8e1a0550582aff65bf6087b9cc395906de Mon Sep 17 00:00:00 2001 From: makspll Date: Tue, 3 Dec 2024 11:27:25 +0000 Subject: [PATCH 5/8] re-trigger --- docs/src/chapter_1.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/src/chapter_1.md b/docs/src/chapter_1.md index 1259c54e97..5612d699b2 100644 --- a/docs/src/chapter_1.md +++ b/docs/src/chapter_1.md @@ -3,4 +3,5 @@ ## Introduction + Welcome to the greatest documentation of all time WIP \ No newline at end of file From d58c02dff073506ea82a178951f9f2b8a2b15652 Mon Sep 17 00:00:00 2001 From: makspll Date: Tue, 3 Dec 2024 11:28:26 +0000 Subject: [PATCH 6/8] fix typo --- .github/workflows/mdbook.yml | 3 +++ docs/src/chapter_1.md | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/mdbook.yml b/.github/workflows/mdbook.yml index 3891bcc760..3ec0cfb978 100644 --- a/.github/workflows/mdbook.yml +++ b/.github/workflows/mdbook.yml @@ -20,6 +20,9 @@ jobs: uses: actions/checkout@v4 - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true - name: Install mdBook run: cargo install mdbook diff --git a/docs/src/chapter_1.md b/docs/src/chapter_1.md index 5612d699b2..1259c54e97 100644 --- a/docs/src/chapter_1.md +++ b/docs/src/chapter_1.md @@ -3,5 +3,4 @@ ## Introduction - Welcome to the greatest documentation of all time WIP \ No newline at end of file From ab588bf57535816e6e52df46e3681c555250aef4 Mon Sep 17 00:00:00 2001 From: makspll Date: Tue, 3 Dec 2024 11:41:09 +0000 Subject: [PATCH 7/8] fix working dir --- .github/workflows/mdbook.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/mdbook.yml b/.github/workflows/mdbook.yml index 3ec0cfb978..3076bbfb04 100644 --- a/.github/workflows/mdbook.yml +++ b/.github/workflows/mdbook.yml @@ -6,6 +6,7 @@ on: - "**" paths: - 'docs/**' + - '.github/workflows/mdbook.yml' jobs: @@ -13,7 +14,7 @@ jobs: name: Build Book - mdbook runs-on: ubuntu-latest env: - working-directory: docs/src + working-directory: docs steps: - name: Checkout repository From a0e47ab07343df913849aaa97a4eda6fe647b795 Mon Sep 17 00:00:00 2001 From: makspll Date: Tue, 3 Dec 2024 11:46:11 +0000 Subject: [PATCH 8/8] fix working dir --- .github/workflows/mdbook.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/mdbook.yml b/.github/workflows/mdbook.yml index 3076bbfb04..80984049ee 100644 --- a/.github/workflows/mdbook.yml +++ b/.github/workflows/mdbook.yml @@ -13,8 +13,6 @@ jobs: build: name: Build Book - mdbook runs-on: ubuntu-latest - env: - working-directory: docs steps: - name: Checkout repository @@ -24,16 +22,17 @@ jobs: with: toolchain: stable override: true - + - name: Rust Cache + uses: Swatinem/rust-cache@v2.7.3 - name: Install mdBook run: cargo install mdbook - name: Build the book - run: mdbook build + run: cd docs && mdbook build - name: Deploy to GitHub Pages if: github.ref == 'refs/heads/main' uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: book \ No newline at end of file + publish_dir: docs/book \ No newline at end of file