File tree Expand file tree Collapse file tree 3 files changed +65
-37
lines changed Expand file tree Collapse file tree 3 files changed +65
-37
lines changed Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ name : Test Documentation Build
2
+
3
+ on :
4
+ push :
5
+ branches : [ main ]
6
+ pull_request :
7
+ branches : [ main ]
8
+ workflow-dispatch :
9
+
10
+ jobs :
11
+ build-docs :
12
+ runs-on : ubuntu-latest
13
+ steps :
14
+ - uses : actions/checkout@v3
15
+
16
+ - name : Set up Python
17
+ uses : actions/setup-python@v4
18
+ with :
19
+ python-version : ' 3.10'
20
+
21
+ - name : Set up Node.js
22
+ uses : actions/setup-node@v3
23
+ with :
24
+ node-version : ' 16'
25
+
26
+ - name : Install dependencies
27
+ run : |
28
+ python -m pip install --upgrade pip
29
+ pip install -r docs/requirements.txt
30
+ pip install -e .
31
+
32
+ - name : Build theme assets
33
+ run : |
34
+ npx grunt default
35
+
36
+ - name : Build Test documentation
37
+ run : |
38
+ cd docs
39
+ sphinx-build -b html . _build/html
40
+
41
+ - name : Upload documentation artifact
42
+ uses : actions/upload-artifact@v3
43
+ with :
44
+ name : documentation
45
+ path : docs/_build/html/
46
+
47
+ doc-preview :
48
+ runs-on : ubuntu-latest
49
+ needs : build-docs
50
+ if : ${{ github.event_name == 'pull_request' }}
51
+ steps :
52
+ - name : Download artifact
53
+ uses : actions/download-artifact@v4
54
+ with :
55
+ name : documentation
56
+ path : docs/_build/html
57
+
58
+ - name : Upload docs preview
59
+ uses : seemethere/upload-artifact-s3@v5
60
+ with :
61
+ retention-days : 14
62
+ s3-bucket : doc-previews
63
+ if-no-files-found : error
64
+ path : docs/_build/html
65
+ s3-prefix : pytorch_sphinx_theme/${{ github.event.pull_request.number }
You can’t perform that action at this time.
0 commit comments