aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Harder <radhermit@gmail.com>2021-03-05 13:05:25 -0700
committerTim Harder <radhermit@gmail.com>2021-03-05 13:05:25 -0700
commit726656fc52f0ce9345dd35105eb248c55fb55651 (patch)
treefd9eb1c2513521c707ca44a639e2e2e0c1248db9 /.github
parentbump version and add news (diff)
downloadpkgdev-726656fc52f0ce9345dd35105eb248c55fb55651.tar.gz
pkgdev-726656fc52f0ce9345dd35105eb248c55fb55651.tar.bz2
pkgdev-726656fc52f0ce9345dd35105eb248c55fb55651.zip
github: add initial doc workflow to publish to gh-pages
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/doc.yml44
1 files changed, 44 insertions, 0 deletions
diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml
new file mode 100644
index 0000000..66fc13d
--- /dev/null
+++ b/.github/workflows/doc.yml
@@ -0,0 +1,44 @@
+name: doc
+
+on:
+ push:
+ branches: [main]
+
+jobs:
+ build-and-deploy:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v2
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v2
+ with:
+ python-version: 3.8
+
+ - name: Configure pip cache
+ uses: actions/cache@v2
+ with:
+ path: ~/.cache/pip
+ key: ${{ runner.os }}-pip-${{ hashFiles('requirements/*') }}
+ restore-keys: ${{ runner.os }}-pip-
+
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip
+ pip install -r requirements/dev.txt
+ pip install -r requirements/docs.txt
+
+ - name: Build sphinx documentation
+ run: |
+ python setup.py build_docs
+ # notify github this isn't a jekyll site
+ touch build/sphinx/html/.nojekyll
+
+ - name: Deploy docs to gh-pages
+ uses: JamesIves/github-pages-deploy-action@3.7.1
+ with:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ BRANCH: gh-pages
+ FOLDER: build/sphinx/html
+ SINGLE_COMMIT: true