Documentation #77
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: Update Gitlab Documentation | |
run: | | |
cd .. | |
git clone ${{ secrets.GITLAB_DOC_URL }} | |
GL_BRANCH_NAME="documentation-ref_$GITHUB_SHA" | |
git config user.name ${{ secrets.GITLAB_USER }} | |
git config user.email ${{ secrets.GITLAB_EMAIL }} | |
cp ../**/*.md . | |
git checkout -b $GL_BRANCH_NAME | |
git add . | |
git commit --allow-empty -m "Created by $GITHUB_ACTOR" | |
git remote set-url origin ${{ secrets.GITLAB_DOC_URL }} | |
git push --set-upstream origin $GL_BRANCH_NAME |