Skip to content
This repository was archived by the owner on Sep 19, 2023. It is now read-only.

Commit 0a8cac3

Browse files
committed
build docs for python-rocksdb using github-pages
1 parent 676021b commit 0a8cac3

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed

.github/workflows/gh-pages.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
build:
10+
name: "Build docs"
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/setup-python@v4
14+
- uses: actions/checkout@v3
15+
with:
16+
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
17+
- name: "Install deps and build with Sphinx"
18+
run: >
19+
cd docs
20+
pip3 install -r ./docs/docs.txt
21+
make html
22+
- name: "Upload artifacts"
23+
uses: actions/upload-pages-artifact@v1
24+
with:
25+
# Upload built docs
26+
path: "./docs/_build/html/"
27+
deploy:
28+
name: "Deploy docs"
29+
needs: build
30+
runs-on: ubuntu-latest
31+
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
32+
permissions:
33+
pages: write # to deploy to Pages
34+
id-token: write # to verify the deployment originates from an appropriate source
35+
# Deploy to the github-pages environment
36+
environment:
37+
name: github-pages
38+
url: ${{ steps.deployment.outputs.page_url }}
39+
steps:
40+
- uses: actions/deploy-pages@v1
41+
id: deployment
42+
name: "Deploy to GitHub Pages"

docs/docs.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
-r requirements.txt
2+
sphinx<6.0.0
3+
sphinx-celery
4+
sphinx-autodoc-typehints
5+
m2r2
6+
sphinx_rtd_theme
7+
jinja2<3.1.0

0 commit comments

Comments
 (0)