Skip to content

Commit 5f16a73

Browse files
authored
Merge pull request #484 from facultyai/docs-release-task
Don't auto-deploy docs on file change
2 parents ecd8e6b + 394b381 commit 5f16a73

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

.github/workflows/build-docs.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
11
name: Build docs
22

33
on:
4-
push:
5-
branches:
6-
- master
7-
paths:
8-
- docs/**
9-
- examples/**
10-
- .github/workflows/build-docs.yml
11-
- .github/actions/push_docs/**
124
release:
135
types:
146
- released

tasks.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,21 @@ def copy_examples(ctx):
8585
)
8686

8787

88+
@task(copy_examples)
89+
def documentation(ctx):
90+
"""
91+
Push documentation to Heroku
92+
"""
93+
info("Deploying docs")
94+
run("git checkout -b inv-push-docs")
95+
run("git add docs/examples/vendor/*.py -f")
96+
run('git commit -m "Add examples" --allow-empty')
97+
run("git subtree split --prefix docs -b docs-deploy")
98+
run("git push -f origin docs-deploy")
99+
run("git checkout master")
100+
run("git branch -D inv-push-docs docs-deploy")
101+
102+
88103
@task(
89104
help={
90105
"version": "Version number to finalize. Must be "

0 commit comments

Comments
 (0)