forked from dj-stripe/dj-stripe
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated docs to build and manage and show version based github pages …
…docs
- Loading branch information
1 parent
b658278
commit 145d809
Showing
1 changed file
with
25 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,13 +2,21 @@ name: Build and deploy docs | |
|
||
on: | ||
push: | ||
branches: [master] | ||
branches: | ||
- "master" | ||
# Push events to branches matching | ||
# refs/heads/stable/2.5 | ||
# refs/heads/stable/10 | ||
# refs/heads/stable/2 | ||
# refs/heads/stable/2.5.6 | ||
- "stable/[0-9]+(.[0-9])*(.[0-9])*" | ||
|
||
workflow_dispatch: # to trigger manually | ||
|
||
env: | ||
POETRY_VERSION: "1.1.11" | ||
POETRY_VIRTUALENVS_IN_PROJECT: "1" | ||
LATEST_STABLE_BRANCH: "stable/2.5" | ||
|
||
jobs: | ||
|
||
|
@@ -49,5 +57,19 @@ jobs: | |
- name: Install dependencies | ||
run: poetry install -E docs | ||
|
||
- name: Deploy docs to Github Pages | ||
run: poetry run mkdocs gh-deploy --force | ||
- name: Configure git user to make commit | ||
run: | | ||
git config user.name "Arnav Choudhury" | ||
git config user.email "[email protected]" | ||
- name: Fetch gh-pages remote changes (if any) | ||
run: git fetch origin gh-pages --depth=1 | ||
|
||
- name: Deploy (and Update) docs for the branch, ${GITHUB_REF##*/} | ||
run: poetry run mike deploy --push --rebase "${GITHUB_REF##*/}" | ||
|
||
- name: Set default docs to ${LATEST_STABLE_BRANCH##*/} | ||
run: poetry run mike set-default --push --rebase "${LATEST_STABLE_BRANCH##*/}" | ||
|
||
|
||
|