From 6297c96f0fe8e6d469e4edbe29cb2b920e9326d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Bregu=C5=82a?= Date: Sat, 22 May 2021 02:18:14 +0200 Subject: [PATCH 1/2] Verify documentation on CI --- .github/workflows/build-docs.yml | 31 +++++++++++++++++++++++++++++++ docs/conf.py | 2 +- requirements_dev.txt | 2 ++ 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/build-docs.yml diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml new file mode 100644 index 00000000..47bee6d0 --- /dev/null +++ b/.github/workflows/build-docs.yml @@ -0,0 +1,31 @@ +name: Build documentation + +on: + push: + pull_request: + types: [opened, synchronize] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.9 + uses: actions/setup-python@v2 + with: + python-version: 3.9 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + pip install -r requirements_dev.txt + pip install -e . + - name: Build documentation + run: | + python -m sphinx -T -b html -d _build/doctrees -D language=en . _build/html --color -n -W + - uses: actions/upload-artifact@v2 + name: 🚀 Upload docs as artifact + with: + name: airflow-website + path: './docs/_build/html' + if-no-files-found: error \ No newline at end of file diff --git a/docs/conf.py b/docs/conf.py index 68450c2e..5c299e15 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -58,4 +58,4 @@ # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] +html_static_path = [] diff --git a/requirements_dev.txt b/requirements_dev.txt index 13290ebe..fb38e977 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -9,3 +9,5 @@ requests==2.22.0 responses==0.10.12 webob strict-rfc3339==0.7 +sphinx==4.0.2 +sphinx-rtd-theme==0.5.2 From f8d8228fa2a0015d0fe635204bce1e175ba11c38 Mon Sep 17 00:00:00 2001 From: p1c2u Date: Sat, 22 May 2021 12:54:10 +0100 Subject: [PATCH 2/2] Build documentation arguments fix --- .github/workflows/build-docs.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index 47bee6d0..9460e1e9 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -6,7 +6,7 @@ on: types: [opened, synchronize] jobs: - test: + build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -22,10 +22,10 @@ jobs: pip install -e . - name: Build documentation run: | - python -m sphinx -T -b html -d _build/doctrees -D language=en . _build/html --color -n -W + python -m sphinx -T -b html -d docs/_build/doctrees -D language=en docs docs/_build/html -n -W - uses: actions/upload-artifact@v2 - name: 🚀 Upload docs as artifact + name: Upload docs as artifact with: - name: airflow-website + name: docs-html path: './docs/_build/html' - if-no-files-found: error \ No newline at end of file + if-no-files-found: error