Skip to content

Commit 78f51eb

Browse files
committed
moved docs back to original location, renamed new docs to "new-docs"
1 parent 92fe97c commit 78f51eb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+82
-51
lines changed

.github/workflows/docs.yml

Lines changed: 39 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,43 @@
44
name: Build docs
55

66
on:
7+
release:
8+
types: [published]
79
push:
810
branches:
911
- master
1012
pull_request:
11-
# release:
12-
# types: [published]
1313

1414
concurrency:
1515
group: ${{ github.workflow }}-${{ github.ref }}
1616
cancel-in-progress: true
1717

1818
jobs:
1919
build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v4
23+
- name: Set up Python
24+
uses: actions/setup-python@v5
25+
with:
26+
python-version: '3.x'
27+
- name: Install dependencies
28+
run: |
29+
python -m pip install --upgrade pip
30+
pip install build twine
31+
- name: Install package
32+
run: pip install .[doc]
33+
- name: Build docs
34+
run: |
35+
cd docs
36+
make html
37+
cd ..
38+
- uses: actions/upload-artifact@v3
39+
with:
40+
name: docs
41+
path: docs/build/html
42+
43+
build-new:
2044
runs-on: ubuntu-latest
2145
steps:
2246
- uses: actions/checkout@v4
@@ -32,26 +56,32 @@ jobs:
3256
run: |
3357
python -m pip install --upgrade pip
3458
pip install build twine
35-
36-
- name: Build docs
59+
- name: Install package
60+
run: pip install .[doc]
61+
- name: Build new docs
3762
run: |
38-
cd docs
63+
cd new-docs
3964
make html
40-
twine upload dist/*
65+
cd ..
4166
- uses: actions/upload-artifact@v3
4267
with:
43-
name: built-docs
44-
path: docs/build/html
68+
name: new-docs
69+
path: new-docs/build/html
4570

4671
deploy:
4772
needs: [build]
4873
runs-on: ubuntu-latest
4974
steps:
50-
- name: Download built docs
75+
- name: Download docs
5176
uses: actions/download-artifact@v3
5277
with:
5378
name: built-docs
5479
path: docs-build
80+
- name: Download new docs
81+
uses: actions/download-artifact@v3
82+
with:
83+
name: new-docs
84+
path: docs-build/new
5585
- name: Check for GHPAGES_DEPLOY_KEY token
5686
id: deployable
5787
if: github.event_name == 'release'
File renamed without changes.

docs/Makefile

Lines changed: 18 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
SPHINXOPTS =
66
SPHINXBUILD = sphinx-build
77
PAPER =
8-
BUILDDIR = build
8+
BUILDDIR = _build
9+
CURBRANCH = master
10+
PYTHONPATH = $(PWD)
911

1012
# User-friendly check for sphinx-build
1113
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
@@ -15,11 +17,11 @@ endif
1517
# Internal variables.
1618
PAPEROPT_a4 = -D latex_paper_size=a4
1719
PAPEROPT_letter = -D latex_paper_size=letter
18-
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
20+
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
1921
# the i18n builder cannot share the environment and doctrees with the others
20-
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
22+
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
2123

22-
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest coverage gettext
24+
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
2325

2426
help:
2527
@echo "Please use \`make <target>' where <target> is one of"
@@ -30,7 +32,6 @@ help:
3032
@echo " json to make JSON files"
3133
@echo " htmlhelp to make HTML files and a HTML help project"
3234
@echo " qthelp to make HTML files and a qthelp project"
33-
@echo " applehelp to make an Apple Help Book"
3435
@echo " devhelp to make HTML files and a Devhelp project"
3536
@echo " epub to make an epub"
3637
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@@ -46,13 +47,16 @@ help:
4647
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
4748
@echo " linkcheck to check all external links for integrity"
4849
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
49-
@echo " coverage to run coverage check of the documentation (if enabled)"
50+
5051

5152
clean:
5253
rm -rf $(BUILDDIR)/*
54+
rm -rf reference/*
55+
rm -rf docs/api
5356

5457
html:
55-
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
58+
mkdir -p _static _templates
59+
PYTHONPATH=$(PYTHONPATH) $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
5660
@echo
5761
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
5862

@@ -87,25 +91,17 @@ qthelp:
8791
@echo
8892
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
8993
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
90-
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Pype9.qhcp"
94+
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/pydra.qhcp"
9195
@echo "To view the help file:"
92-
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Pype9.qhc"
93-
94-
applehelp:
95-
$(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
96-
@echo
97-
@echo "Build finished. The help book is in $(BUILDDIR)/applehelp."
98-
@echo "N.B. You won't be able to view it unless you put it in" \
99-
"~/Library/Documentation/Help or install it in your application" \
100-
"bundle."
96+
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/pydra.qhc"
10197

10298
devhelp:
10399
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
104100
@echo
105101
@echo "Build finished."
106102
@echo "To view the help file:"
107-
@echo "# mkdir -p $$HOME/.local/share/devhelp/Pype9"
108-
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Pype9"
103+
@echo "# mkdir -p $$HOME/.local/share/devhelp/pydra"
104+
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/pydra"
109105
@echo "# devhelp"
110106

111107
epub:
@@ -176,11 +172,6 @@ doctest:
176172
@echo "Testing of doctests in the sources finished, look at the " \
177173
"results in $(BUILDDIR)/doctest/output.txt."
178174

179-
coverage:
180-
$(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage
181-
@echo "Testing of coverage in the sources finished, look at the " \
182-
"results in $(BUILDDIR)/coverage/python.txt."
183-
184175
xml:
185176
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
186177
@echo
@@ -190,3 +181,6 @@ pseudoxml:
190181
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
191182
@echo
192183
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
184+
185+
versioned:
186+
PYTHONPATH=$(PYTHONPATH) sphinx-versioning -vv -l ./docs/conf.py build -r $(CURBRANCH) ./docs/ docs/$(BUILDDIR)/html/
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)