From 9e53be495d59709e89fcd0ce3e46a8e6bb255011 Mon Sep 17 00:00:00 2001 From: Nicolas Perriault Date: Tue, 3 Sep 2024 15:55:33 +0200 Subject: [PATCH] feat: add gh workflow. --- .github/workflows/mdbook.yml | 26 ++++++++++++++++++++++++++ tech-docs/src/chapter_1.md | 2 +- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/mdbook.yml diff --git a/.github/workflows/mdbook.yml b/.github/workflows/mdbook.yml new file mode 100644 index 0000000000..1da6bcf1d1 --- /dev/null +++ b/.github/workflows/mdbook.yml @@ -0,0 +1,26 @@ +name: Build, test and deploy mdbook tech docs + +on: + # SWITCH TO [ master ] FOR push ONLY BEFORE LANDING + push: + branches: [ "*" ] + pull_request: + branches: [ "*" ] + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: write # To push a branch + pull-requests: write # To create a PR from that branch + steps: + - uses: actions/checkout@v4 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + - run: (test -x $HOME/.cargo/bin/mdbook || cargo install mdbook) + - run: mdbook build tech-docs && mdbook test tech-docs + - uses: JamesIves/github-pages-deploy-action@4.1.7 + with: + branch: gh-pages # The branch the action should deploy to. + folder: book # The folder the action should deploy. diff --git a/tech-docs/src/chapter_1.md b/tech-docs/src/chapter_1.md index df117128f6..8a25757ad7 100644 --- a/tech-docs/src/chapter_1.md +++ b/tech-docs/src/chapter_1.md @@ -1,3 +1,3 @@ # Ecobalyse — Documentation technique -This is cool. +This is a test, don't panic.