Publish docs only for releases

This commit is contained in:
eikendev 2022-04-18 13:44:28 +02:00
parent bf3e87ad86
commit 7a3d13f28e
No known key found for this signature in database
GPG key ID: A1BDB1B28C8EF694
2 changed files with 6 additions and 14 deletions

View file

@ -2,29 +2,20 @@ name: Documentation
on: on:
push: push:
paths-ignore: tags:
- '**.md' - 'v[0-9]+.[0-9]+.[0-9]+'
- '**.jpg'
- '**.jpeg'
- '**.png'
- '**.yaml'
- '**.json'
env: env:
PB_BUILD_VERSION: unknown # Needed for using Make targets.
SSH_AUTH_SOCK: /tmp/ssh_agent.sock SSH_AUTH_SOCK: /tmp/ssh_agent.sock
jobs: jobs:
build_documentation: build_documentation:
name: Build documentation name: Build documentation
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions:
contents: read
if: ${{ github.ref == 'refs/heads/main' }}
steps: steps:
- name: Checkout the repository - name: Checkout the repository
uses: actions/checkout@v3 uses: actions/checkout@v3
with:
fetch-depth: 0 # Needed to describe git ref during build.
- name: Export GOBIN - name: Export GOBIN
uses: actions/setup-go@v3 uses: actions/setup-go@v3

View file

@ -9,6 +9,9 @@ on:
- '!v[0-9]+.[0-9]+.[0-9]+' - '!v[0-9]+.[0-9]+.[0-9]+'
pull_request: pull_request:
env:
PB_BUILD_VERSION: pipeline-${{ github.sha }}
jobs: jobs:
test_build: test_build:
name: Test and build name: Test and build
@ -16,8 +19,6 @@ jobs:
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v3 uses: actions/checkout@v3
with:
fetch-depth: 0 # Needed to describe git ref during build.
- name: Export GOBIN - name: Export GOBIN
uses: actions/setup-go@v3 uses: actions/setup-go@v3