Skip to content

Merge pull request #1 from getsynq/feature/cll #6

Merge pull request #1 from getsynq/feature/cll

Merge pull request #1 from getsynq/feature/cll #6

name: generate docs
on:
push:
branches:
- main
paths:
- 'protos/**'
- 'generate_docs.sh'
- '.github/workflows/generate_docs.yaml'
workflow_dispatch:
concurrency:
cancel-in-progress: true
group: api-generate-docs-${{ github.head_ref || github.run_id }}
defaults:
run:
shell: bash
jobs:
generate:
if: '!contains(github.event.commits[0].message, ''ci skip'')'
runs-on: ubuntu-latest
env:
CI_COMMIT_MESSAGE: CI generated docs
CI_COMMIT_AUTHOR_NAME: Synqlair
CI_COMMIT_AUTHOR_EMAIL: [email protected]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "1.21"
- name: Install Protoc
uses: arduino/setup-protoc@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: "21.x"
- name: Install protoc generators
run: |
go install github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc@latest
- name: Generate and push
run: |
bash generate_docs.sh
git config --global user.name "${{ env.CI_COMMIT_AUTHOR_NAME }}"
git config --global user.email "${{ env.CI_COMMIT_AUTHOR_EMAIL }}"
git add docs
git commit -m "${{ env.CI_COMMIT_MESSAGE }}"
git push
timeout-minutes: 5