File tree 3 files changed +29
-2
lines changed
3 files changed +29
-2
lines changed Original file line number Diff line number Diff line change 5
5
push :
6
6
branches :
7
7
- main
8
+ release :
9
+ types :
10
+ - created
8
11
9
12
permissions :
10
13
contents : write
14
17
runs-on : ubuntu-latest
15
18
steps :
16
19
- uses : actions/checkout@v4
20
+ with :
21
+ fetch-depth : 0
17
22
- uses : actions/setup-python@v4
18
23
with :
19
24
python-version : 3.x
25
30
restore-keys : |
26
31
mkdocs-material-
27
32
- run : pip install -r requirements-doc.txt
28
- - name : Build documentation
33
+ - run : mkdocs build
34
+
35
+ - name : Set up Git
36
+ run : |
37
+ git config user.name ${{ github.actor }}
38
+ git config user.email ${{ github.actor }}@users.noreply.github.com
39
+
40
+ - name : Publish Tag as latest
41
+ env :
42
+ GOOGLE_ANALYTICS_KEY : ${{ secrets.GOOGLE_ANALYTICS_KEY }}
43
+ if : github.event_name == 'release'
44
+ run : |
45
+ mike deploy --push --update-aliases ${{ github.ref_name }} latest
46
+ mike set-default --push latest
47
+
48
+ - name : Publish main as unstable
29
49
env :
30
50
GOOGLE_ANALYTICS_KEY : ${{ secrets.GOOGLE_ANALYTICS_KEY }}
31
- run : mkdocs gh-deploy --force
51
+ if : github.event_name == 'push'
52
+ run : |
53
+ mike deploy --push --update-aliases ${{ github.ref_name }} unstable
Original file line number Diff line number Diff line change @@ -45,6 +45,10 @@ extra:
45
45
analytics :
46
46
provider : google
47
47
property : !ENV GOOGLE_ANALYTICS_KEY
48
+ version :
49
+ provider : mike
50
+ default : latest
51
+ alias : true
48
52
49
53
# Extensions
50
54
markdown_extensions :
Original file line number Diff line number Diff line change @@ -6,3 +6,4 @@ mkdocs-section-index
6
6
mkdocstrings[python]
7
7
mkdocs-git-committers-plugin-2
8
8
mkdocs-git-revision-date-localized-plugin
9
+ mike
You can’t perform that action at this time.
0 commit comments