File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -20,24 +20,26 @@ jobs:
20
20
job-name : Build doc
21
21
runner : linux.2xlarge
22
22
docker-image : executorch-ubuntu-22.04-clang12
23
- fetch-depth : 0
24
23
submodules : ' true'
25
24
repository : pytorch/executorch
26
25
upload-artifact : docs
27
-
28
26
script : |
29
- # Set up Environment Variables
30
- PYTHON_VERSION=3.10
31
- export PATH="/opt/conda/envs/py_${PYTHON_VERSION}/bin:${PATH}"
27
+ # The generic Linux job chooses to use base env, not the one setup by the image
28
+ CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]")
29
+ conda activate "${CONDA_ENV}"
30
+
31
+ source .ci/scripts/utils.sh
32
+ # This is a simple Python script but as it tries to import executorch.examples.models,
33
+ # it requires a whole bunch of Executorch dependencies on the Docker image
34
+ install_executorch
32
35
33
36
if [[(${GITHUB_EVENT_NAME} = 'pull_request' && (${GITHUB_BASE_REF} = 'release'*)) || (${GITHUB_REF} = 'refs/heads/release'*) ]]; then
34
37
export CHANNEL=test
35
38
else
36
39
export CHANNEL=nightly
37
40
fi
38
41
39
- set -ex
40
- set +u
42
+ set -eux
41
43
42
44
# Build docset:
43
45
cd docs
48
50
49
51
# Sometimes the artifact directory already contains an "html" subdir.
50
52
rm -rf "${RUNNER_ARTIFACT_DIR}/html"
51
-
52
53
mv docs/_build/html "${RUNNER_ARTIFACT_DIR}"
53
54
54
55
# Enable preview later. Previews are available publicly
@@ -73,12 +74,13 @@ jobs:
73
74
name : docs
74
75
- name : Upload docs
75
76
run : |
76
-
77
77
set -x
78
78
git config user.name 'pytorchbot'
79
79
git config user.email '[email protected] '
80
+
80
81
rm -rf main
81
82
mv html main
83
+
82
84
git add --all main || true
83
85
git commit -m "Auto-generating sphinx docs" || true
84
86
git push -f
You can’t perform that action at this time.
0 commit comments