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..80984049ee --- /dev/null +++ b/.github/workflows/mdbook.yml @@ -0,0 +1,38 @@ +name: Deploy mdBook to GitHub Pages + +on: + push: + branches: + - "**" + paths: + - 'docs/**' + - '.github/workflows/mdbook.yml' + +jobs: + + build: + name: Build Book - mdbook + runs-on: ubuntu-latest + steps: + + - name: Checkout repository + uses: actions/checkout@v4 + + - uses: actions-rs/toolchain@v1 + 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: 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: docs/book \ No newline at end of file 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..1259c54e97 --- /dev/null +++ b/docs/src/chapter_1.md @@ -0,0 +1,6 @@ +# Chapter 1 + + +## Introduction + +Welcome to the greatest documentation of all time WIP \ No newline at end of file