Add topology features #253
This file contains hidden or 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: build-pb-doc | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "pb/tzf/v1/tzinfo.proto" | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - "pb/tzf/v1/tzinfo.proto" | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| deployments: write | |
| jobs: | |
| build-doc: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| - uses: bufbuild/buf-action@v1 | |
| with: | |
| token: ${{ secrets.BUF_TOKEN }} | |
| breaking: false | |
| lint: false | |
| pr_comment: false | |
| - run: | | |
| buf generate | |
| - name: Upload a Build Artifact | |
| uses: actions/upload-artifact@v7 | |
| if: ${{ github.ref_name == 'main' }} | |
| with: | |
| name: "Probuf HTML File" | |
| path: "gen/doc/tzf/v1/index.html" | |
| push-doc: | |
| needs: build-doc | |
| runs-on: ubuntu-latest | |
| if: ${{ github.ref_name == 'main' }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| ref: gh-pages | |
| - name: Download a Build Artifact | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: "Probuf HTML File" | |
| path: "./outputs" | |
| - run: | | |
| ls -alh | |
| ls -alh ./outputs | |
| cp outputs/index.html ./docs/pb.html | |
| - name: Check if there are any changes | |
| id: verify_diff | |
| run: | | |
| git diff --quiet . || echo "changed=true" >> $GITHUB_OUTPUT | |
| - name: Push file update | |
| if: steps.verify_diff.outputs.changed == 'true' | |
| run: | | |
| git add ./docs/pb.html | |
| git config user.name github-actions | |
| git config user.email github-actions@github.com | |
| git commit -m "Update Probuf HTML doc" | |
| git push |