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

View file

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