aboutsummaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorGravatar Hassan Abouelela <[email protected]>2021-12-02 15:08:38 +0400
committerGravatar Hassan Abouelela <[email protected]>2021-12-02 15:32:01 +0400
commit6bc78cc6bdb60b628c1c8db49ec7d79bf7883bf9 (patch)
tree34439ce37d56d2bb9ade2eb1eae24d55ecc04372 /.github
parentAdd Sphinx Docs (diff)
Add Documentation Deploy Action
Adds a github action to deploy the documentation.
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/docs.yaml51
1 files changed, 51 insertions, 0 deletions
diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml
new file mode 100644
index 00000000..47480c3a
--- /dev/null
+++ b/.github/workflows/docs.yaml
@@ -0,0 +1,51 @@
+name: Build Docs
+
+on:
+ push:
+ branches:
+ - main
+ pull_request:
+ workflow_dispatch:
+
+concurrency:
+ group: docs-deployment-${{ github.ref }}
+ cancel-in-progress: true
+
+
+jobs:
+ build-deploy:
+ name: Build & Deploy Docs
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Install Python Dependencies
+ uses: HassanAbouelela/actions/setup-python@setup-python_v1.0.0
+ with:
+ dev: false
+ python_version: 3.9
+
+ # Undeclared dependency for `releases`... whoops
+ # https://github.com/bitprophet/releases/pull/82
+ - run: pip install six
+
+ - name: Generate AutoDoc References
+ run: sphinx-apidoc -o docs/output botcore -fe
+
+ - name: Generate HTML Site
+ run: sphinx-build -nW -j auto -b html docs docs/build
+
+ - name: Uplaod Build Artifact
+ uses: actions/upload-artifact@v2
+ with:
+ name: docs
+ path: docs/build/*
+
+ - name: Deploy To GitHub Pages
+ uses: JamesIves/[email protected]
+ with:
+ branch: docs
+ folder: docs/build
+ # We only want to actually push the build if we're on main, otherwise just make sure everything works
+ dry-run: ${{ github.ref != 'refs/heads/main' }}