Skip to content

Commit 43d0585

Browse files
authored
FIX - Upload documentation only when merging to main (#209)
* skip upload to gh-pages if it branch not main
1 parent 11f399b commit 43d0585

File tree

1 file changed

+13
-17
lines changed

1 file changed

+13
-17
lines changed

.circleci/config.yml

+13-17
Original file line numberDiff line numberDiff line change
@@ -67,31 +67,27 @@ jobs:
6767
cd ..;
6868
6969
70-
# Deploy docs
70+
# Add stable doc
71+
- run:
72+
name: add stable doc
73+
command: |
74+
set -e
75+
mkdir -p ~/.ssh
76+
echo -e "Host *\nStrictHostKeyChecking no" > ~/.ssh/config
77+
chmod og= ~/.ssh/config
78+
cd doc;
79+
make add-stable-doc;
80+
81+
82+
# upload to gh-pages
7183
- run:
7284
name: deploy
7385
command: |
7486
if [[ ${CIRCLE_BRANCH} == "main" ]]; then
75-
set -e
76-
mkdir -p ~/.ssh
77-
echo -e "Host *\nStrictHostKeyChecking no" > ~/.ssh/config
78-
chmod og= ~/.ssh/config
79-
cd doc;
8087
pip install ghp-import;
81-
make add-stable-doc
8288
make install
8389
fi
8490
85-
# Add stable documentation
86-
- run:
87-
name: stable_doc
88-
command: |
89-
set -e
90-
mkdir -p ~/.ssh
91-
echo -e "Host *\nStrictHostKeyChecking no" > ~/.ssh/config
92-
chmod og= ~/.ssh/config
93-
cd doc;
94-
make add-stable-doc
9591
9692
# Save the outputs
9793
- store_artifacts:

0 commit comments

Comments
 (0)