Commit 10f5d3e 1 parent 4ae0160 commit 10f5d3e Copy full SHA for 10f5d3e
File tree 3 files changed +31
-2
lines changed
3 files changed +31
-2
lines changed Original file line number Diff line number Diff line change @@ -33,12 +33,23 @@ jobs:
33
33
if : ${{ startsWith(github.ref, 'refs/tags/') }}
34
34
run : |
35
35
VERSION=$(git describe --abbrev=0 --tags)
36
- echo "Deploy release docs to version $VERSION"
37
- mike deploy --push --update-aliases $VERSION latest
36
+ # check if rc or beta release
37
+ if [[ $VERSION == *"rc"* ]] || [[ $VERSION == *"beta"* ]]; then
38
+ export DOCS_PRERELEASE=true
39
+ echo "Deploying pre-release docs"
40
+ mike deploy --push --update-aliases $VERSION rc
41
+ else
42
+ echo "Deploying release docs"
43
+ mike deploy --push --update-aliases $VERSION latest
44
+ fi
45
+ env :
46
+ DOCS_DEV : false
38
47
39
48
- name : Deploy dev docs
40
49
if : ${{ !startsWith(github.ref, 'refs/tags/') }}
41
50
run : mike deploy --push --update-aliases dev
51
+ env :
52
+ DOCS_DEV : true
42
53
43
54
- name : Update default release docs
44
55
run : mike set-default --push latest
Original file line number Diff line number Diff line change 1
1
{% extends "base.html" %}
2
2
3
+ {% set prebuild = 'pre-release' if config.extra.pre_release else 'dev' if config.extra.dev_build else '' %}
4
+
5
+ {% block announce %}
6
+ {%- if prebuild -%} <!-- See the dashes here -->
7
+ <!-- Need to reapply margin from base CSS, which is overridden in extra CSS (to fix empty banner) -->
8
+ < div style ="margin: 0.6rem auto ">
9
+ You are currently viewing documentation for a < strong > {{prebuild}}</ strong > build.
10
+ This may reference unreleased features.
11
+ For latest release, see
12
+ < strong > < a href ="{{ '../' ~ base_url }} "> stable release docs</ a > </ strong > .
13
+ </ div >
14
+ {%- endif -%}
15
+ {% endblock %}
16
+
3
17
{% block outdated %}
4
18
You're not viewing the latest version.
5
19
< a href ="{{ '../' ~ base_url }} ">
Original file line number Diff line number Diff line change @@ -126,6 +126,10 @@ hooks:
126
126
extra :
127
127
version :
128
128
provider : mike
129
+ # either of these tags will enable the "viewing pre" announcement banner
130
+ # see _overrides/main.html
131
+ pre_release : !ENV ["DOCS_PRERELEASE", false]
132
+ dev_build : !ENV ["DOCS_DEV", false]
129
133
social :
130
134
- icon : fontawesome/brands/github
131
135
link : https://github.com/pyapp-kit
You can’t perform that action at this time.
0 commit comments