mirror of
https://github.com/signalapp/Signal-Server
synced 2026-07-06 00:55:03 +01:00
46 lines
1.5 KiB
YAML
46 lines
1.5 KiB
YAML
name: Update Documentation
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build:
|
|
permissions:
|
|
contents: write
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
|
- uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
|
|
with:
|
|
distribution: 'temurin'
|
|
java-version-file: .java-version
|
|
cache: 'maven'
|
|
- name: Install gRPC documentation tooling
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y protobuf-compiler
|
|
pip install sabledocs
|
|
- name: Generate OpenAPI documentation
|
|
run: ./mvnw compile
|
|
- name: Generate gRPC documentation
|
|
run: |
|
|
protoc -I service/src/main/proto service/src/main/proto/org/signal/chat/*.proto \
|
|
-o api-doc/grpc/descriptor.pb --include_source_info
|
|
cd api-doc/grpc && sabledocs
|
|
- name: Push documentation to gh-pages
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
git config user.email "github@signal.org"
|
|
git config user.name "Documentation Updater"
|
|
git fetch origin gh-pages
|
|
git checkout gh-pages
|
|
cp api-doc/target/openapi/signal-server-openapi.yaml .
|
|
rm -rf grpc
|
|
cp -r api-doc/grpc/sabledocs_output grpc
|
|
git add -A signal-server-openapi.yaml grpc
|
|
git diff --cached --quiet || git commit -m "Updating documentation"
|
|
git push origin gh-pages -q
|