Bump actions/upload-artifact from 4.2.0 to 4.3.0 #212
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: build-pb-doc | |
on: | |
push: | |
branches: [main] | |
paths: | |
- "pb/tzinfo.proto" | |
- ".github/workflows/build-pb-doc.yml" | |
pull_request: | |
branches: [main] | |
paths: | |
- "pb/tzinfo.proto" | |
- ".github/workflows/build-pb-doc.yml" | |
permissions: | |
contents: write | |
deployments: write | |
jobs: | |
build-doc: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.21 | |
- name: Install go pkgs | |
run: | | |
make install | |
- name: Install pb pkgs | |
run: | | |
go install github.com/golang/protobuf/protoc-gen-go@latest | |
go install github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc@latest | |
- name: Setup protoc | |
uses: arduino/[email protected] | |
- name: Build doc | |
run: | | |
make pb | |
- name: Upload a Build Artifact | |
uses: actions/[email protected] | |
if: ${{ github.ref_name == 'main' }} | |
with: | |
name: "Probuf HTML File" | |
path: "pb/pb.html" | |
push-doc: | |
needs: build-doc | |
runs-on: ubuntu-latest | |
if: ${{ github.ref_name == 'main' }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: gh-pages | |
- name: Download a Build Artifact | |
uses: actions/[email protected] | |
with: | |
name: "Probuf HTML File" | |
path: "./docs" | |
- name: Push file update | |
run: | | |
git add ./docs/pb.html | |
git config user.name github-actions | |
git config user.email [email protected] | |
git commit -m "Update Probuf HTML doc" | |
git push |