File tree Expand file tree Collapse file tree 1 file changed +69
-0
lines changed Expand file tree Collapse file tree 1 file changed +69
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Update documentation
2
+ on :
3
+ push :
4
+ branches :
5
+ - main
6
+ paths :
7
+ - docs/**
8
+ workflow_dispatch :
9
+ inputs :
10
+ logLevel :
11
+ description : ' Log level'
12
+ required : true
13
+ default : ' manual'
14
+ type : choice
15
+ options :
16
+ - manual
17
+ - info
18
+ - warning
19
+ - debug
20
+
21
+ jobs :
22
+ build :
23
+ runs-on : ubuntu-22.04
24
+ steps :
25
+ - uses : actions/setup-python@v5
26
+ with :
27
+ python-version : ' 3.11'
28
+ - uses : actions/checkout@v4
29
+ with :
30
+ fetch-depth : 0 # otherwise, you will failed to push refs to dest repo
31
+ - name : Install dependencies
32
+ run : |
33
+ pip install -r docs/requirements.txt
34
+ - name : List directories
35
+ run : |
36
+ ls -la
37
+ - name : Build Sphinx Documentation
38
+ run : |
39
+ cd docs
40
+ make html
41
+ - name : Add files
42
+ run : |
43
+ echo "nebula.enriquetomasmb.com" > docs/_build/CNAME
44
+ - name : List directories
45
+ run : |
46
+ ls -la docs/_build/
47
+ - uses : actions/checkout@v4
48
+ with :
49
+ ref : gh-pages
50
+ path : gh-pages
51
+ - name : List directories
52
+ run : |
53
+ ls -la gh-pages/
54
+ - name : Copy documentation to the gh-pages branch
55
+ run : |
56
+ cp -r docs/_build/* gh-pages/
57
+ - name : List directories
58
+ run : |
59
+ ls -la gh-pages/
60
+ - name : Commit and Push changes
61
+ run : |
62
+ cd gh-pages
63
+ git config user.name github-actions
64
+ git config user.email github-actions@github.com
65
+ git add .
66
+ git commit -m "Update documentation" -a || echo "No changes to commit"
67
+ git push origin gh-pages
68
+ env :
69
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments