Skip to content

Commit b6931a7

Browse files
committed
Refactor build system
1 parent 320c833 commit b6931a7

36 files changed

+413
-13504
lines changed

.github/workflows/doc.yml

Lines changed: 0 additions & 45 deletions
This file was deleted.

.github/workflows/pages.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: pages
2+
on:
3+
pull_request:
4+
push:
5+
branches:
6+
- master
7+
concurrency:
8+
# Only run the latest workflow per-branch
9+
group: "${{ github.workflow }}-${{ github.ref_name }}"
10+
cancel-in-progress: true
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
- name: Set up Python
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: "3.x"
21+
- name: Install Poetry
22+
run: |
23+
pip install --upgrade pip
24+
pip install poetry
25+
- name: Install project
26+
run: |
27+
poetry install
28+
- name: Build docs
29+
run: |
30+
poetry run task build
31+
- name: Upload GitHub Pages artifact
32+
uses: actions/upload-pages-artifact@v3
33+
with:
34+
path: "build/html"
35+
deploy:
36+
needs: build
37+
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
38+
permissions:
39+
pages: write
40+
id-token: write
41+
environment:
42+
name: github-pages
43+
url: ${{ steps.deployment.outputs.page_url }}
44+
runs-on: ubuntu-latest
45+
steps:
46+
- name: Deploy to GitHub Pages
47+
id: deployment
48+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
resonant_docs/build
1+
/build
2+
23
.DS_Store

CNAME

Whitespace-only changes.

README.md

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,8 @@
1-
# resonant
1+
# Resonant
2+
Resonant marketing website.
23

3-
Resonant documentation materials.
4-
5-
## Build instructions
6-
7-
You can use `poetry` to build and view the documentation locally. There are two
8-
ways to do it.
9-
10-
11-
### Static build
12-
13-
1. Run `poetry install` to build the dependencies.
14-
2. Run `poetry run task build` to build the documentation.
15-
3. Run `poetry run task serve` to serve the docs on port 8000 (or `poetry run
16-
task serve 8001` to use a different port of your choice).
17-
18-
### Watch mode build.
19-
20-
1. Run `poetry install` to build the dependencies.
21-
2. Run `poetry run task watch` to build and serve the docs on port 8000 (or
22-
`poetry run task watch PORT=8001` to use a different port of your choice).
4+
## Development instructions
5+
1. [Install Poetry](https://python-poetry.org/docs/#installation)
6+
2. Run `poetry install` to build the dependencies.
7+
2. Run `poetry run task watch` to build and serve the docs.
238
Changes to the documentation source code will cause an automatic rebuild.

poetry.lock

Lines changed: 293 additions & 260 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,26 @@
11
[tool.poetry]
22
name = "resonant_docs"
33
version = "0.1.0"
4-
description = "Documentation for Resonant"
4+
description = "Resonant marketing website"
55
authors = ["Kitware D&A Team <[email protected]>"]
66

77
[tool.poetry.dependencies]
8-
python = "^3.8"
8+
python = "^3.12"
99

10-
[tool.poetry.dev-dependencies]
10+
[tool.poetry.group.docs.dependencies]
1111
Sphinx = "^4.5.0"
1212
sphinx-copybutton = "^0.5.0"
13-
sphinx-notfound-page = "^0.8"
1413
sphinx-panels = "^0.6.0"
1514
furo = "^2022.4.7"
15+
16+
[tool.poetry.group.dev.dependencies]
1617
taskipy = "^1.10.2"
1718
sphinx-autobuild = "^2021.3.14"
1819

1920
[tool.taskipy.tasks]
20-
build = { cmd = "make html -C doc", help = "Build the HTML documentation" }
21-
serve = { cmd = "python -m http.server --bind 127.0.0.1 -d doc/build/html", help = "Serve the built docs (supply an optional port number, 8000 by default)" }
22-
watch = { cmd = "make livehtml -C doc", help = "Build the HTML documentation in watch mode" }
21+
pre_build = "rm -rf ./build"
22+
build = "sphinx-build -M html resonant_docs build"
23+
watch = "sphinx-autobuild --port 0 resonant_docs build"
2324

2425
[build-system]
2526
requires = ["poetry-core>=1.0.0"]

requirements_doc.txt

Lines changed: 0 additions & 5 deletions
This file was deleted.

resonant_docs/Makefile

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)