on master help sign in
Deploy docs for master separately (#1783)

* Deploy docs for master separately * Output docs for every tagged release * Update .github/workflows/gh-pages.yml Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>

commit85492e587cc27ba9783c8380683660a0f4423ff4 authorGokul Soumya <gokulps15@gmail.com> dateMon 14 Mar 2022, 08:16 (5 years ago) parent1ac576f
3 files changed+32−1
.github/workflows/gh-pages.yml+15−1 book/src/SUMMARY.md+2 book/src/title-page.md+15
.github/workflows/gh-pages.yml+15−1
@@ -4,6 +4,8 @@ on:
44 push:
55 branches:
66 - master
7+ tags:
8+ - '*'
79
810jobs:
911 deploy:
@@ -18,10 +20,22 @@ jobs:
1820 # mdbook-version: '0.4.8'
1921
2022 - run: mdbook build book
23+
24+ - name: Set output directory
25+ run: |
26+ OUTDIR=$(basename ${{ github.ref }})
27+ echo "OUTDIR=$OUTDIR" >> $GITHUB_ENV
2128
2229 - name: Deploy
2330 uses: peaceiris/actions-gh-pages@v3
24− if: github.ref == 'refs/heads/master'
31+ with:
32+ github_token: ${{ secrets.GITHUB_TOKEN }}
33+ publish_dir: ./book/book
34+ destination_dir: ./${{ env.OUTDIR }}
35+
36+ - name: Deploy stable
37+ uses: peaceiris/actions-gh-pages@v3
38+ if: startswith(github.ref, 'refs/tags/')
2539 with:
2640 github_token: ${{ secrets.GITHUB_TOKEN }}
2741 publish_dir: ./book/book
book/src/SUMMARY.md+2
@@ -1,5 +1,7 @@
11# Summary
22
3+[Helix](./title-page.md)
4+
35- [Installation](./install.md)
46- [Usage](./usage.md)
57 - [Keymap](./keymap.md)
book/src/title-page.mdnew file+15
@@ -0,0 +1,15 @@
1+# Helix
2+
3+Docs for bleeding edge master can be found at
4+[https://docs.helix-editor.com/master](https://docs.helix-editor.com/master).
5+
6+See the [usage] section for a quick overview of the editor, [keymap]
7+section for all available keybindings and the [configuration] section
8+for defining custom keybindings, setting themes, etc.
9+
10+Refer the [FAQ] for common questions.
11+
12+[FAQ]: https://github.com/helix-editor/helix/wiki/FAQ
13+[usage]: ./usage.md
14+[keymap]: ./keymap.md
15+[configuration]: ./configuration.md