Refine 'Publish documentation' workflow (#3673)

* Only publish documentation when changed

* Enable manual publishing of the documentation

* Don't try to publish documentation from forks
This commit is contained in:
Florian Albrechtskirchinger 2022-08-04 22:53:05 +02:00 committed by GitHub
parent b6e2942d1c
commit b13b8748b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,6 +5,10 @@ on:
push: push:
branches: branches:
- develop - develop
paths:
- docs/mkdocs/**
- docs/examples/**
workflow_dispatch:
# we don't want to have concurrent jobs, and we don't want to cancel running jobs to avoid broken publications # we don't want to have concurrent jobs, and we don't want to cancel running jobs to avoid broken publications
concurrency: concurrency:
@ -13,6 +17,7 @@ concurrency:
jobs: jobs:
publish_documentation: publish_documentation:
if: github.repository == 'nlohmann/json'
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3