Skip to content

Commit 203d38c

Browse files
committed
ci: Update documentation deployment workflow
1 parent 2e61ca9 commit 203d38c

File tree

3 files changed

+235
-31
lines changed

3 files changed

+235
-31
lines changed

.github/workflows/docs_pages.yaml

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,16 @@ jobs:
1717
python-version: 3.9
1818
- uses: abatilo/actions-poetry@v2.1.3
1919
- name: install
20-
run: poetry install -E amazon
21-
- name: Sphinx build
22-
uses: ammaraskar/sphinx-action@master
23-
with:
24-
docs-folder: docs/
25-
- name: Commit documentation changes
20+
run: poetry install -E amazon -E docs
21+
- name: Build documentation
2622
run: |
27-
git clone git@github.com:tomasfarias/airflow_dbt_python.git --branch gh-pages --single-branch gh-pages
28-
cp -r docs/_build/html/* gh-pages/
29-
cd gh-pages
30-
git config --local user.email "action@github.com"
31-
git config --local user.name "GitHub Action"
32-
git add .
33-
git commit -m "Update documentation" -a || true
34-
- name: Push changes
35-
uses: ad-m/github-push-action@master
23+
mkdir gh-pages
24+
touch gh-pages/.nojekyll
25+
cd docs/
26+
poetry run sphinx-build -b html . _build
27+
cp -r _build/* ../gh-pages/
28+
- name: Deploy documentation
29+
uses: JamesIves/github-pages-deploy-action@4.1.4
3630
with:
3731
branch: gh-pages
38-
directory: gh-pages
39-
github_token: ${{ secrets.GITHUB_TOKEN }}
32+
folder: gh-pages

0 commit comments

Comments
 (0)