Skip to content

Commit 246f361

Browse files
committed
Enable RTD integration
1 parent f065883 commit 246f361

File tree

2 files changed

+14
-92
lines changed

2 files changed

+14
-92
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,9 @@ on:
88
pull_request:
99
branches:
1010
- main
11-
types:
12-
- opened
13-
- reopened
14-
- synchronize
15-
- closed
16-
1711
jobs:
18-
# Download LuaLs for all platforms all at once, to reduce total number of downloads.
1912
prepare:
2013
name: Download LuaLs
21-
if: ${{ !(github.event_name == 'pull_request' && github.event.action == 'closed') }}
2214
runs-on: ubuntu-latest
2315
steps:
2416
- name: Checkout source
@@ -52,15 +44,10 @@ jobs:
5244
path: ~/lua_ls_release
5345
include-hidden-files: true
5446
retention-days: 3
55-
56-
# Runs main tests for the package.
57-
#
58-
# Runs on all events except when closing a pull request.
5947
test:
6048
name: Test package
6149
needs:
6250
- prepare
63-
if: ${{ !(github.event_name == 'pull_request' && github.event.action == 'closed') }}
6451
strategy:
6552
fail-fast: false
6653
matrix:
@@ -114,56 +101,10 @@ jobs:
114101
- name: Check code style
115102
if: ${{ matrix.type == 'code style' }}
116103
run: pre-commit run -a
117-
118-
# Builds sphinx documentation.
119-
#
120-
# Runs on all events except when closing a pull request.
121-
build_docs:
122-
name: Build docs
123-
needs:
124-
- test
125-
if: ${{ github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') && !contains(github.event.ref, '.dev') }}
126-
runs-on: ubuntu-latest
127-
steps:
128-
- name: Checkout
129-
uses: actions/checkout@v4
130-
with:
131-
fetch-depth: 0
132-
- name: Set up python 3.12
133-
uses: actions/setup-python@v4
134-
with:
135-
python-version: 3.12
136-
- name: Install package
137-
run: |
138-
python -m pip install --upgrade pip
139-
python -m pip install . --group doc
140-
- name: Download LuaLs
141-
uses: actions/download-artifact@v4
142-
with:
143-
name: lua_ls_release
144-
path: ~/lua_ls_release
145-
- name: Build docs
146-
env:
147-
SPHINXOPTS: "-j auto -n"
148-
LUA_LS_CACHE_PATH: ~/lua_ls_release/ubuntu-latest
149-
run: |
150-
cd docs
151-
make html
152-
- name: Upload artifact
153-
uses: actions/upload-artifact@v4
154-
with:
155-
name: html_output
156-
path: docs/build/html
157-
include-hidden-files: true
158-
159-
# Builds and publishes python packages.
160-
#
161-
# Only runs on tag pushes.
162104
publish_to_pypi:
163105
name: Publish package to PyPi
164106
needs:
165107
- test
166-
- build_docs
167108
if: ${{ github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') }}
168109
runs-on: ubuntu-latest
169110
environment:
@@ -182,7 +123,7 @@ jobs:
182123
run: |
183124
ref="${{ github.ref }}";
184125
version=${ref#refs/tags/v};
185-
link="https://pypi.org/p/${{ github.repository }}/${version}";
126+
link="https://pypi.org/p/sphinx-lua-ls/${version}";
186127
echo "version=${version}" >> $GITHUB_OUTPUT
187128
echo "link=${link}" >> $GITHUB_OUTPUT
188129
- name: Parse Changelog
@@ -220,35 +161,3 @@ jobs:
220161
${{ steps.changelog.outputs.changes }}
221162
222163
[See release on PyPi](${{ steps.metadata.outputs.link }})
223-
224-
# Builds and publishes production docs.
225-
#
226-
# Only runs on tag pushes.
227-
publish_docs:
228-
name: Publish docs to GitHub Pages
229-
needs:
230-
- build_docs
231-
- publish_to_pypi
232-
if: ${{ github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') && !contains(github.event.ref, '.dev') }}
233-
concurrency:
234-
group: publish-docs-${{ github.ref }}
235-
cancel-in-progress: true
236-
permissions: write-all
237-
runs-on: ubuntu-latest
238-
steps:
239-
- name: Checkout
240-
uses: actions/checkout@v4
241-
with:
242-
fetch-depth: 0
243-
- name: Download artifact
244-
uses: actions/download-artifact@v4
245-
with:
246-
name: html_output
247-
path: docs/build/html
248-
- name: Publish HTML
249-
uses: JamesIves/github-pages-deploy-action@v4
250-
with:
251-
folder: docs/build/html
252-
target-folder: .
253-
clean-exclude: pr-preview
254-
single-commit: false

.readthedocs.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
version: 2
2+
build:
3+
os: ubuntu-24.04
4+
tools:
5+
python: "3.13"
6+
jobs:
7+
post_checkout:
8+
- git fetch --unshallow || true
9+
install:
10+
- pip install -U pip
11+
- pip install . --group doc
12+
sphinx:
13+
configuration: docs/source/conf.py

0 commit comments

Comments
 (0)