From 85492e587cc27ba9783c8380683660a0f4423ff4 Mon Sep 17 00:00:00 2001 From: Gokul Soumya Date: Mon, 14 Mar 2022 08:16:40 +0530 Subject: [PATCH] Deploy docs for master separately (#1783) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Deploy docs for master separately * Output docs for every tagged release * Update .github/workflows/gh-pages.yml Co-authored-by: Blaž Hrastnik --- .github/workflows/gh-pages.yml | 16 +++++++++++++++- book/src/SUMMARY.md | 2 ++ book/src/title-page.md | 15 +++++++++++++++ 3 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 book/src/title-page.md diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index bf3488c8d..223f8450f 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -4,6 +4,8 @@ on: push: branches: - master + tags: + - '*' jobs: deploy: @@ -18,10 +20,22 @@ jobs: # mdbook-version: '0.4.8' - run: mdbook build book + + - name: Set output directory + run: | + OUTDIR=$(basename ${{ github.ref }}) + echo "OUTDIR=$OUTDIR" >> $GITHUB_ENV - name: Deploy uses: peaceiris/actions-gh-pages@v3 - if: github.ref == 'refs/heads/master' + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./book/book + destination_dir: ./${{ env.OUTDIR }} + + - name: Deploy stable + uses: peaceiris/actions-gh-pages@v3 + if: startswith(github.ref, 'refs/tags/') with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./book/book diff --git a/book/src/SUMMARY.md b/book/src/SUMMARY.md index a8f165c01..9e15eee33 100644 --- a/book/src/SUMMARY.md +++ b/book/src/SUMMARY.md @@ -1,5 +1,7 @@ # Summary +[Helix](./title-page.md) + - [Installation](./install.md) - [Usage](./usage.md) - [Keymap](./keymap.md) diff --git a/book/src/title-page.md b/book/src/title-page.md new file mode 100644 index 000000000..c182a753c --- /dev/null +++ b/book/src/title-page.md @@ -0,0 +1,15 @@ +# Helix + +Docs for bleeding edge master can be found at +[https://docs.helix-editor.com/master](https://docs.helix-editor.com/master). + +See the [usage] section for a quick overview of the editor, [keymap] +section for all available keybindings and the [configuration] section +for defining custom keybindings, setting themes, etc. + +Refer the [FAQ] for common questions. + +[FAQ]: https://github.com/helix-editor/helix/wiki/FAQ +[usage]: ./usage.md +[keymap]: ./keymap.md +[configuration]: ./configuration.md