Skip to content

Commit 2e4c0b5

Browse files
committed
remove spinx-mutlibuild
1 parent 4ea9c64 commit 2e4c0b5

File tree

6 files changed

+225
-258
lines changed

6 files changed

+225
-258
lines changed

.github/workflows/docs.yml

Lines changed: 13 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
name: Docs CI
32

43
on:
@@ -7,63 +6,40 @@ on:
76

87
jobs:
98
build:
9+
name: "Docs CI"
1010
runs-on: ubuntu-latest
1111

1212
steps:
1313
- name: Checkout Source
1414
uses: actions/checkout@v2
1515
with:
16-
# require all of history to see all tagged versions' docs
16+
# require history to get back to last tag for version number of branches
1717
fetch-depth: 0
18+
submodules: true
1819

1920
- name: Set up Python
2021
uses: actions/setup-python@v2
2122
with:
22-
python-version: "3.7"
23-
24-
- name: Install Packages
25-
# Can delete this if you don't use graphviz in your docs
26-
run: sudo apt-get install graphviz
23+
python-version: "3.9"
2724

2825
- name: Install Python Dependencies
2926
run: |
3027
pip install pipenv
3128
pipenv install --dev --deploy --python $(which python) && pipenv graph
32-
33-
- name: Deploy index
34-
# We pin to the SHA, not the tag, for security reasons.
35-
# https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/security-hardening-for-github-actions#using-third-party-actions
36-
uses: peaceiris/actions-gh-pages@bbdfb200618d235585ad98e965f4aafc39b4c501 # v3.7.3
37-
with:
38-
github_token: ${{ secrets.GITHUB_TOKEN }}
39-
publish_dir: .github/pages
40-
keep_files: true
41-
42-
- name: Checkout gh-pages
43-
# As we already did a deploy of gh-pages above, it is guaranteed to be there
44-
# so check it out so we can selectively build docs below
45-
uses: actions/checkout@v2
46-
with:
47-
ref: gh-pages
48-
path: build/html
49-
50-
- name: Maybe use sphinx-multiversion
51-
# If we are building main or a tag we will publish
52-
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags')
53-
# So use the args we normally pass to sphinx-build, but run sphinx-multiversion
54-
run: mv $(pipenv --venv)/bin/sphinx-multiversion $(pipenv --venv)/bin/sphinx-build
55-
5629
- name: Build Docs
5730
run: pipenv run docs
5831

32+
- name: Move to versioned directory
33+
# e.g. master or 0.1.2
34+
run: mv build/html ".github/pages/${GITHUB_REF##*/}"
35+
5936
- name: Publish Docs to gh-pages
60-
# Only main and tags are published
61-
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags')
37+
# Only master and tags are published
38+
if: "${{ github.repository_owner == 'dls-controls' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags')) }}"
6239
# We pin to the SHA, not the tag, for security reasons.
63-
# https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/security-hardening-for-github-actions#using-third-party-actions
40+
# https://docs.github.com/en/actions/learn-github-actions/security-hardening-for-github-actions#using-third-party-actions
6441
uses: peaceiris/actions-gh-pages@bbdfb200618d235585ad98e965f4aafc39b4c501 # v3.7.3
6542
with:
6643
github_token: ${{ secrets.GITHUB_TOKEN }}
67-
publish_dir: build/html
68-
keep_files: true
69-
44+
publish_dir: .github/pages
45+
keep_files: true

Pipfile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@ mypy = "*"
1111
atomicwrites = "*"
1212
typing-extensions = "*"
1313
importlib-metadata = "*"
14-
# Switch to main repo after PR https://github.com/Holzhaus/sphinx-multiversion/pull/64 is merged
15-
sphinx-multiversion = {editable = true,git = "https://github.com/dls-controls/sphinx-multiversion.git",ref = "only-arg"}
16-
# List wheel here to make sure we make the same version to make wheels on gitlab and github CI
17-
wheel = "0.33.1"
14+
1815
# Test and docs dependencies
1916
pytest-cov = "*"
2017
pytest-mypy = "*"

0 commit comments

Comments
 (0)