| # Licensed to the Apache Software Foundation (ASF) under one or more |
| # contributor license agreements. See the NOTICE file distributed with |
| # this work for additional information regarding copyright ownership. |
| # The ASF licenses this file to You under the Apache License, Version 2.0 |
| # (the "License"); you may not use this file except in compliance with |
| # the License. You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| |
| name: build-go-docs |
| |
| on: |
| workflow_dispatch: |
| schedule: |
| - cron: "0 2 * * 6" |
| |
| jobs: |
| build-go-docs: |
| runs-on: ubuntu-latest |
| |
| steps: |
| - name: Checkout |
| uses: actions/checkout@v5 |
| with: |
| fetch-depth: 0 |
| |
| - name: Setup Hugo |
| uses: peaceiris/actions-hugo@v3 |
| with: |
| extended: true |
| |
| - uses: actions/setup-node@v5 |
| with: |
| node-version: 20 |
| cache: npm |
| cache-dependency-path: ./streampipes-client-go/docs/package-lock.json |
| |
| - name: Install docsy npm dependencies |
| working-directory: ./streampipes-client-go/docs |
| run: npm ci --verbose |
| |
| - name: Build |
| working-directory: ./streampipes-client-go/docs |
| run: hugo --minify |
| |
| - name: Publish Go docs as artifact |
| uses: actions/upload-artifact@v4 |
| with: |
| name: streampipes-go-docs |
| path: | |
| streampipes-client-go/docs/public/ |
| retention-days: 5 |