From c423f82666b0607ff66b581d5b54e0121df1b408 Mon Sep 17 00:00:00 2001 From: Gokul Soumya Date: Thu, 10 Mar 2022 09:52:51 +0530 Subject: [PATCH 1/3] Deploy docs for master separately --- .github/workflows/gh-pages.yml | 14 ++++++++++++-- book/src/SUMMARY.md | 2 ++ book/src/title-page.md | 15 +++++++++++++++ 3 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 book/src/title-page.md diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index bf3488c8db13..24bcabb00c8e 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -4,6 +4,8 @@ on: push: branches: - master + release: + types: [published] jobs: deploy: @@ -19,9 +21,17 @@ jobs: - run: mdbook build book - - name: Deploy + - name: Deploy master uses: peaceiris/actions-gh-pages@v3 - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/master' && github.event_name == 'push' + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./book/book + destination_dir: ./master + + - name: Deploy tagged release + uses: peaceiris/actions-gh-pages@v3 + if: github.event_name == 'release' with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./book/book diff --git a/book/src/SUMMARY.md b/book/src/SUMMARY.md index a8f165c01797..9e15eee33d0d 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 000000000000..c182a753c830 --- /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 From f6d48151cf561c91758f6181257f915b21fbd3c4 Mon Sep 17 00:00:00 2001 From: Gokul Soumya Date: Sun, 13 Mar 2022 11:56:42 +0530 Subject: [PATCH 2/3] Output docs for every tagged release --- .github/workflows/gh-pages.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 24bcabb00c8e..973db63c8b11 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -4,8 +4,8 @@ on: push: branches: - master - release: - types: [published] + tags: + - '*' jobs: deploy: @@ -20,18 +20,22 @@ jobs: # mdbook-version: '0.4.8' - run: mdbook build book + + - name: Set ouput directory + run: | + OUTDIR=$(basename ${{ github.ref }}) + echo "OUTDIR=$OUTDIR" >> $GITHUB_ENV - - name: Deploy master + - name: Deploy uses: peaceiris/actions-gh-pages@v3 - if: github.ref == 'refs/heads/master' && github.event_name == 'push' with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./book/book - destination_dir: ./master + destination_dir: ./${{ env.OUTDIR }} - - name: Deploy tagged release + - name: Deploy stable uses: peaceiris/actions-gh-pages@v3 - if: github.event_name == 'release' + if: startswith(github.ref, 'refs/tags/') with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./book/book From ffac81a5ec645ce5cef2bf89b8ffdf6f03a84a8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20Hrastnik?= Date: Sun, 13 Mar 2022 19:43:02 +0900 Subject: [PATCH 3/3] Update .github/workflows/gh-pages.yml --- .github/workflows/gh-pages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 973db63c8b11..223f8450f493 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -21,7 +21,7 @@ jobs: - run: mdbook build book - - name: Set ouput directory + - name: Set output directory run: | OUTDIR=$(basename ${{ github.ref }}) echo "OUTDIR=$OUTDIR" >> $GITHUB_ENV