Documentation #57
Workflow file for this run
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
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: Git Setup | |
run: | | |
git config user.name ${{ secrets.GITLAB_USER }} | |
git config user.email ${{ secrets.GITLAB_EMAIL }} | |
git remote add upstream ${{ secrets.GITLAB_DOC_URL }} | |
- name: Update Gitlab Documentation | |
run: | | |
LATEST_TAG=$(git describe --tags --always --abbrev=0) | |
BRANCH_NAME="documentation-ref_$LATEST_TAG" | |
git checkout -b $BRANCH_NAME | |
git cherry-pick -n $LATEST_TAG | |
git add \*.md docs/ | |
git commit --allow-empty -m "Created by $GITHUB_ACTOR" | |
git push upstream $BRANCH_NAME |