Skip to content

Commit

Permalink
ci: πŸ‘· supervision documentation πŸ“š release CI added
Browse files Browse the repository at this point in the history
Signed-off-by: Onuralp SEZER <[email protected]>
  • Loading branch information
onuralpszr committed Mar 31, 2024
1 parent f4f9b3d commit a679a54
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 0 deletions.
File renamed without changes.
63 changes: 63 additions & 0 deletions .github/workflows/publish-release-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Supervision Release Documentation Workflow πŸ“š
on:
push:
tags:
- '[0-9]+.[0-9]+[0-9]+.[0-9]'
branches-ignore:
- 'develop'


workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'push' && github.ref}}
cancel-in-progress: true

permissions:
contents: write
pages: write
pull-requests: write


jobs:
doc-build-deploy:
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]
steps:
- name: πŸ›ŽοΈ Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.head_ref }}

- name: 🐍 Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: πŸ“¦ Install mkdocs-material
run: pip install "mkdocs-material"
- name: πŸ“¦ Install mkdocstrings[python]
run: pip install "mkdocstrings[python]"
- name: πŸ“¦ Install mkdocs-material[imaging]
run: pip install "mkdocs-material[imaging]"
- name: πŸ“¦ Install mike
run: pip install "mike"
- name: πŸ“¦ Install mkdocs-git-revision-date-localized-plugin
run: pip install "mkdocs-git-revision-date-localized-plugin"
- name: πŸ“¦ Install JupyterLab
run: pip install jupyterlab
- name: πŸ“¦ Install mkdocs-jupyter
run: pip install mkdocs-jupyter
- name: πŸ“¦ Install mkdocs-git-committers-plugin-2
run: pip install mkdocs-git-committers-plugin-2
- name: βš™οΈ Configure git for github-actions πŸ‘·
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: πŸš€ Deploy MkDoc-Material πŸ“š
run: |
latest_tag=$(git describe --tags `git rev-list --tags --max-count=1`)
MKDOCS_GIT_COMMITTERS_APIKEY=${{ secrets.GITHUB_TOKEN }} mike deploy --push --update-aliases $latest_tag latest

0 comments on commit a679a54

Please sign in to comment.