Skip to content

feat: Auto publish docs to version "develop" #269

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 22 commits into from
Dec 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/on-docs-change.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Auto publish docs to version "develop"

on:
push:
branches:
- main
paths:
- 'docs/**'
- 'CHANGELOG.md'
- 'mkdocs.yml'
- '.github/workflows/on-docs-change.yml'

jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python
uses: actions/[email protected]
with:
python-version: "3.8"
- name: Install dependencies
run: |
pip install --upgrade pip
pip install mike==1.1.2 mkdocs-material==8.0.5 mkdocs-git-revision-date-plugin==0.3.1
- name: Setup doc deploy
run: |
git config --global user.name Docs deploy
git config --global user.email [email protected]
- name: Build docs website and (TODO) API reference
run: |
VERSION="develop"
ALIAS="stage"
mkdocs build
mike deploy --push --update-aliases "$VERSION" "$ALIAS"
- name: Deploy all docs
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site
keep_files: true
destination_dir: develop/api
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,7 @@ coverage
.vscode

# Python virtual environments (for running mkdocs locally)
venv
venv

# Static documentation site generated by Mkdocs
site
Loading