Skip to content

Commit 2e61ca9

Browse files
committed
ci: Build package before building Sphinx docs
1 parent 3426e9f commit 2e61ca9

File tree

6 files changed

+19
-8
lines changed

6 files changed

+19
-8
lines changed

.flake8

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ per-file-ignores =
77
tests/*.py: D1,D2,D4
88
examples/*.py: D1,D2,D4
99
__version__.py: D100
10+
__init__.py: F401
1011
exclude =
1112
airflow
1213
docs/conf.py

.github/workflows/docs_pages.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,19 @@ jobs:
1212
uses: actions/checkout@master
1313
with:
1414
fetch-depth: 0
15+
- uses: actions/setup-python@v2
16+
with:
17+
python-version: 3.9
18+
- uses: abatilo/actions-poetry@v2.1.3
19+
- name: install
20+
run: poetry install -E amazon
1521
- name: Sphinx build
1622
uses: ammaraskar/sphinx-action@master
1723
with:
1824
docs-folder: docs/
1925
- name: Commit documentation changes
2026
run: |
21-
git clone https://github.com/ammaraskar/sphinx-action-test.git --branch gh-pages --single-branch gh-pages
27+
git clone git@github.com:tomasfarias/airflow_dbt_python.git --branch gh-pages --single-branch gh-pages
2228
cp -r docs/_build/html/* gh-pages/
2329
cd gh-pages
2430
git config --local user.email "action@github.com"

.github/workflows/test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: test
1+
name: Tests
22
on:
33
push:
44
branches: [ master ]

airflow_dbt_python/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
"""Provides an Airflow operator and hooks to run all or most dbtcommands."""
2+
from .__version__ import __author__, __copyright__, __title__, __version__

airflow_dbt_python/__version__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1+
__author__ = "Tomás Farías Santana"
2+
__copyright__ = "Copyright 2021 Tomás Farías Santana"
3+
__title__ = "airflow-dbt-python"
14
__version__ = "0.7.2"

docs/conf.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@
1313
import os
1414
import sys
1515

16-
sys.path.insert(0, os.path.abspath("../airflow_dbt_python"))
17-
16+
sys.path.insert(0, os.path.abspath(".."))
17+
import airflow_dbt_python
1818

1919
# -- Project information -----------------------------------------------------
2020

21-
project = "airflow-dbt-python"
22-
copyright = "2021, Tomás Farías Santana"
23-
author = "Tomás Farías Santana"
21+
project = airflow_dbt_python.__title__
22+
copyright = airflow_dbt_python.__copyright__
23+
author = airflow_dbt_python.__author__
2424

2525
# The full version, including alpha/beta/rc tags
26-
release = "0.7.2"
26+
release = version = airflow_dbt_python.__version__
2727

2828

2929
# -- General configuration ---------------------------------------------------

0 commit comments

Comments
 (0)