From 97eda8786bf22d9e5ed05a152b0a8af12eb8f2ee Mon Sep 17 00:00:00 2001 From: SyedAhkam Date: Sat, 7 Oct 2023 01:56:48 +0530 Subject: [PATCH] feat: Add action to deploy to pages --- .github/workflows/deploy-docs.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/deploy-docs.yml diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml new file mode 100644 index 0000000..84f80d2 --- /dev/null +++ b/.github/workflows/deploy-docs.yml @@ -0,0 +1,26 @@ +name: Deploy Docs + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + name: Build, Test and Deploy + 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@v2 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + - run: (test -x $HOME/.cargo/bin/mdbook || cargo install --vers "^0.4" mdbook) + - run: mdbook build docs && mdbook test docs # In case of custom book path: mdbook build path/to/mybook && mdbook test path/to/mybook + - uses: JamesIves/github-pages-deploy-action@4.1.7 + with: + branch: gh-pages # The branch the action should deploy to. + folder: docs # The folder the action should deploy. \ No newline at end of file