Skip to content

Documentation

Documentation #42

Workflow file for this run

name: Documentation
on:
push:
branches:
- main
paths:
- "docs/*"
- "**.md"
- "mkdocs.yml"
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.x
- run: cp proto/apidocs.swagger.json docs/reference/apidocs.json
- run: pip install mkdocs-material
- run: pip install mkdocs-git-revision-date-plugin
- run: pip install mkdocs-render-swagger-plugin
- run: pip install mkdocs-mermaid2-plugin
- run: git config user.name 'github-actions[bot]' && git config user.email 'github-actions[bot]@users.noreply.github.com'
- name: Publish docs
run: mkdocs gh-deploy --force
update-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Update Gitlab Documentation
run: |
LATEST_TAG=$(git describe --tags --always --abbrev=0)
BRANCH_NAME="documentation-ref_$LATEST_TAG"
echo Starting to push documentation changes to gitlab...
git config user.name ${{ secrets.GITLAB_USER }}
git config user.email ${{ secrets.GITLAB_EMAIL }}
git remote set-url origin ${{ secrets.GITLAB_DOC_URL }}
git cherry-pick $LATEST_TAG && git commit -m "Created by ${{github.event.pull_request.assignee.email}}"
git push origin main