-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #134 from dgarcia360/docs-setup-project
docs: add sample site
- Loading branch information
Showing
12 changed files
with
1,615 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "pip" | ||
directory: "/docs" | ||
schedule: | ||
interval: "daily" | ||
allow: | ||
- dependency-name: "sphinx-scylladb-theme" | ||
- dependency-name: "sphinx-multiversion-scylla" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
name: "Docs / Publish" | ||
# For more information, | ||
# see https://sphinx-theme.scylladb.com/stable/deployment/production.html#available-workflows | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- 'branch-**' | ||
paths: | ||
- "docs/**" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.repository.default_branch }} | ||
persist-credentials: false | ||
fetch-depth: 0 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Set up env | ||
run: make -C docs setupenv | ||
|
||
- name: Build docs | ||
run: make -C docs multiversion | ||
|
||
- name: Build redirects | ||
run: make -C docs redirects | ||
|
||
- name: Tar folder | ||
run: | | ||
tar \ | ||
--dereference --hard-dereference \ | ||
--directory docs/_build/dirhtml/ \ | ||
-cvf ${{ runner.temp }}/artifact.tar \ | ||
. | ||
- name: Upload artifact | ||
uses: actions/[email protected] | ||
with: | ||
name: github-pages | ||
path: ${{ runner.temp }}/artifact.tar | ||
retention-days: "1" | ||
|
||
release: | ||
# Add a dependency to the build job | ||
needs: build | ||
|
||
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment | ||
permissions: | ||
pages: write # to deploy to Pages | ||
id-token: write # to verify the deployment originates from an appropriate source | ||
contents: read # to read private repo | ||
|
||
# Deploy to the github-pages environment | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
|
||
# Specify runner + deployment step | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: "Docs / Build PR" | ||
# For more information, | ||
# see https://sphinx-theme.scylladb.com/stable/deployment/production.html#available-workflows | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
paths: | ||
- "docs/**" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
fetch-depth: 0 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Set up env | ||
run: make -C docs setupenv | ||
|
||
- name: Build docs | ||
run: make -C docs test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,5 @@ scylla-rust-wrapper/target/ | |
cmake-build-debug/ | ||
.cache/ | ||
version | ||
docs/_build | ||
log/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
# Global variables | ||
# You can set these variables from the command line. | ||
POETRY = poetry | ||
SPHINXOPTS = -j auto | ||
SPHINXBUILD = $(POETRY) run sphinx-build | ||
PAPER = | ||
BUILDDIR = _build | ||
SOURCEDIR = source | ||
|
||
# Internal variables | ||
PAPEROPT_a4 = -D latex_paper_size=a4 | ||
PAPEROPT_letter = -D latex_paper_size=letter | ||
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(SOURCEDIR) | ||
TESTSPHINXOPTS = $(ALLSPHINXOPTS) -W --keep-going | ||
|
||
.PHONY: all | ||
all: dirhtml | ||
|
||
# Setup commands | ||
.PHONY: setupenv | ||
setupenv: | ||
pip install -q poetry | ||
|
||
.PHONY: setup | ||
setup: | ||
$(POETRY) install | ||
|
||
.PHONY: update | ||
update: | ||
$(POETRY) update | ||
|
||
# Clean commands | ||
.PHONY: pristine | ||
pristine: clean | ||
git clean -dfX | ||
|
||
.PHONY: clean | ||
clean: | ||
rm -rf $(BUILDDIR)/* | ||
|
||
# Generate output commands | ||
.PHONY: dirhtml | ||
dirhtml: setup | ||
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml | ||
@echo | ||
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." | ||
|
||
.PHONY: singlehtml | ||
singlehtml: setup | ||
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml | ||
@echo | ||
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." | ||
|
||
.PHONY: epub | ||
epub: setup | ||
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub | ||
@echo | ||
@echo "Build finished. The epub file is in $(BUILDDIR)/epub." | ||
|
||
.PHONY: epub3 | ||
epub3: setup | ||
$(SPHINXBUILD) -b epub3 $(ALLSPHINXOPTS) $(BUILDDIR)/epub3 | ||
@echo | ||
@echo "Build finished. The epub3 file is in $(BUILDDIR)/epub3." | ||
|
||
.PHONY: multiversion | ||
multiversion: setup | ||
$(POETRY) run sphinx-multiversion source $(BUILDDIR)/dirhtml | ||
@echo | ||
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." | ||
|
||
.PHONY: redirects | ||
redirects: setup | ||
$(POETRY) run redirects-cli fromfile --yaml-file _utils/redirects.yaml --output-dir $(BUILDDIR)/dirhtml | ||
@echo | ||
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." | ||
|
||
# Preview commands | ||
.PHONY: preview | ||
preview: setup | ||
$(POETRY) run sphinx-autobuild -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml --port 5500 | ||
|
||
.PHONY: multiversionpreview | ||
multiversionpreview: multiversion | ||
$(POETRY) run python -m http.server 5500 --directory $(BUILDDIR)/dirhtml | ||
|
||
# Test commands | ||
.PHONY: test | ||
test: setup | ||
$(SPHINXBUILD) -b dirhtml $(TESTSPHINXOPTS) $(BUILDDIR)/dirhtml | ||
@echo | ||
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." | ||
|
||
.PHONY: linkcheck | ||
linkcheck: setup | ||
$(SPHINXBUILD) -b linkcheck $(SOURCEDIR) $(BUILDDIR)/linkcheck |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
### a dictionary of redirects | ||
#old path: new path | ||
# | ||
|
||
# removing redirection html script files | ||
# test: / | ||
|
||
/stable/test-redirect.html: /stable/index.html |
Oops, something went wrong.