13
13
workflow_dispatch :
14
14
15
15
jobs :
16
- pages :
17
- name : GitHub Pages
16
+ pre :
17
+ name : Calculate variables for GitHub Pages deployment
18
18
runs-on : ubuntu-latest
19
19
steps :
20
- - uses : actions/checkout@v3
21
-
22
- - name : Setup mdbook
23
- uses : peaceiris/actions-mdbook@adeb05db28a0c0004681db83893d56c0388ea9ea # v1.2.0
24
- with :
25
- mdbook-version : ' 0.4.17'
26
-
27
- - name : Build the documentation
28
- # mdbook will only create an index.html if we're including docs/README.md in SUMMARY.md.
29
- # However, we're using docs/README.md for other purposes and need to pick a new page
30
- # as the default. Let's opt for the welcome page instead.
31
- run : |
32
- mdbook build
33
- cp book/welcome_and_overview.html book/index.html
34
-
35
20
# Figure out the target directory.
36
21
#
37
22
# The target directory depends on the name of the branch
@@ -55,11 +40,65 @@ jobs:
55
40
56
41
# finally, set the 'branch-version' var.
57
42
echo "branch-version=$branch" >> "$GITHUB_OUTPUT"
58
-
43
+ outputs :
44
+ branch-version : ${{ steps.vars.outputs.branch-version }}
45
+
46
+ # ###############################################################################
47
+ pages-docs :
48
+ name : GitHub Pages
49
+ runs-on : ubuntu-latest
50
+ needs :
51
+ - pre
52
+ steps :
53
+ - uses : actions/checkout@v3
54
+
55
+ - name : Setup mdbook
56
+ uses : peaceiris/actions-mdbook@adeb05db28a0c0004681db83893d56c0388ea9ea # v1.2.0
57
+ with :
58
+ mdbook-version : ' 0.4.17'
59
+
60
+ - name : Build the documentation
61
+ # mdbook will only create an index.html if we're including docs/README.md in SUMMARY.md.
62
+ # However, we're using docs/README.md for other purposes and need to pick a new page
63
+ # as the default. Let's opt for the welcome page instead.
64
+ run : |
65
+ mdbook build
66
+ cp book/welcome_and_overview.html book/index.html
67
+
59
68
# Deploy to the target directory.
60
69
- name : Deploy to gh pages
61
70
uses : peaceiris/actions-gh-pages@bd8c6b06eba6b3d25d72b7a1767993c0aeee42e7 # v3.9.2
62
71
with :
63
72
github_token : ${{ secrets.GITHUB_TOKEN }}
64
73
publish_dir : ./book
65
- destination_dir : ./${{ steps.vars.outputs.branch-version }}
74
+ destination_dir : ./${{ needs.pre.outputs.branch-version }}
75
+
76
+ # ###############################################################################
77
+ pages-devdocs :
78
+ name : GitHub Pages (developer docs)
79
+ runs-on : ubuntu-latest
80
+ needs :
81
+ - pre
82
+ steps :
83
+ - uses : action/checkout@v3
84
+
85
+ - name : " Set up Sphinx"
86
+ uses : matrix-org/setup-python-poetry@v1
87
+ with :
88
+ python-version : " 3.x"
89
+ poetry-version : " 1.3.2"
90
+ groups : " dev-docs"
91
+ extras : " "
92
+
93
+ - name : Build the documentation
94
+ run : |
95
+ cd dev-docs
96
+ poetry run make html
97
+
98
+ # Deploy to the target directory.
99
+ - name : Deploy to gh pages
100
+ uses : peaceiris/actions-gh-pages@bd8c6b06eba6b3d25d72b7a1767993c0aeee42e7 # v3.9.2
101
+ with :
102
+ github_token : ${{ secrets.GITHUB_TOKEN }}
103
+ publish_dir : ./dev-docs/_build/html
104
+ destination_dir : ./dev-docs/${{ needs.pre.outputs.branch-version }}
0 commit comments