File tree Expand file tree Collapse file tree 1 file changed +62
-0
lines changed Expand file tree Collapse file tree 1 file changed +62
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Build Docs
2
+
3
+ on :
4
+ push :
5
+ # Sequence of patterns matched against refs/tags
6
+ tags :
7
+ - ' v*' # Push events to matching v*, i.e. v1.0, v20.15.10
8
+ workflow_dispatch :
9
+ inputs :
10
+ version :
11
+ description : Manual Doc Build Reason
12
+ default : test
13
+ required : false
14
+ jobs :
15
+ docs :
16
+ name : build & push docs
17
+ runs-on : ${{ matrix.os }}
18
+ timeout-minutes : 90
19
+ strategy :
20
+ matrix :
21
+ os : ['ubuntu-latest']
22
+ environment-file : [.ci/311.yaml]
23
+ experimental : [false]
24
+ defaults :
25
+ run :
26
+ shell : bash -l {0}
27
+
28
+ steps :
29
+ - name : checkout repo
30
+ uses : actions/checkout@v4
31
+
32
+ - name : setup micromamba
33
+ uses : mamba-org/setup-micromamba@v1
34
+ with :
35
+ environment-file : ${{ matrix.environment-file }}
36
+ micromamba-version : ' latest'
37
+
38
+ - name : Install package
39
+ run : pip install .
40
+
41
+ - name : make docs
42
+ run : cd docs; make html
43
+
44
+ - name : commit docs
45
+ run : |
46
+ git clone https://github.com/ammaraskar/sphinx-action-test.git --branch gh-pages --single-branch gh-pages
47
+ cp -r docs/_build/html/* gh-pages/
48
+ cd gh-pages
49
+ git config --local user.email "action@github.com"
50
+ git config --local user.name "GitHub Action"
51
+ git add .
52
+ git commit -m "Update documentation" -a || true
53
+ # The above command will fail if no changes were present,
54
+ # so we ignore the return code.
55
+
56
+ - name : push to gh-pages
57
+ uses : ad-m/github-push-action@master
58
+ with :
59
+ branch : gh-pages
60
+ directory : gh-pages
61
+ github_token : ${{ secrets.GITHUB_TOKEN }}
62
+ force : true
You can’t perform that action at this time.
0 commit comments